I found a strange thing, maybe it`s bug. I created two plots on the one image. First has type lines, second - bars. The issue is that x labels not appears to the bars plot. But if I delete first plot or change it type to bars - x labels for the second plot becomes visible.
Code:
<?phprequire_once('phplot-6.2.0/phplot.php');// First plot data$data1=array(array('',1468137200,50),array('',1468248200,111),array('',1468359200,75),array('',1468460200,95),array('',1468571200,98),);// Second plot data$data2=array(array('mar',2),array('apr',4),array('may',6),array('jun',10),array('jul',12),array('aug',14),array('sep',20),);$plot_width=500;$plot_height=500;$plot_margin_top=30;$plot_margin_bottom=30;$plot=newPHPlot($plot_width,$plot_height);$plot->SetPrintImage(0);# Draw first plot$plot->SetPlotType('lines');$plot->SetDataType('data-data');$plot->SetXLabelType('time','%d %b');$plot->SetNewPlotAreaPixels(null,0+$plot_margin_top,null,$plot_height/2-$plot_margin_bottom);$plot->SetPlotAreaWorld(NULL,0,NULL,NULL);$plot->SetDataValues($data1);$plot->DrawGraph();# Draw second plot$plot->SetPlotType('bars');$plot->SetDataType('text-data');$plot->SetXTickLabelPos('none');$plot->SetXTickPos('none');$plot->SetNewPlotAreaPixels(null,$plot_height/2+$plot_margin_top,null,$plot_height-$plot_margin_bottom);$plot->SetPlotAreaWorld(NULL,0,NULL,NULL);$plot->SetDataValues($data2);$plot->DrawGraph();$plot->PrintImage();
Two plots:
Only second:
Last edit: Artem 2016-07-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello all.
I found a strange thing, maybe it`s bug. I created two plots on the one image. First has type lines, second - bars. The issue is that x labels not appears to the bars plot. But if I delete first plot or change it type to bars - x labels for the second plot becomes visible.
Code:
Two plots:

Only second:

Last edit: Artem 2016-07-18
I found solution. For the second plot I set x label type to default: