I'm using phplot-6.2.0 on a MacBook Pro running OS 10.13.5 and PHP Version 7.2.0 and I'm getting the warning in the subjectline, and I'm not sure why. The code I'm running that is causing the problem is:
I'm getting 5093 of the warnings, but there are only 6091 of the $array_lin['#']['0'] = "" entries, so I don't see the connection.
This code produces an image:
And while I have y'all's attention, I was wondering if someone could epxlian why the image's y-axis has no ticks between 1 and 1001--I would have expcted ticks for 10-1000.
Any help y'all can give me would be greatly appreciated.
Thanks,
James N
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The message "expects integer, float given" is a little misleading. Normally the float given to imageline() is a whole number which gets silently converted to integer. In your case, mostly likely, the Y value is 0 or negative. For a log plot that gets you INF or NaN respectively, which cannot be converted to integer.
Check your data. You probably have some Y <= 0.0. Can't do that with a log plot.
As for tick marks, log plots have never been implemented that well. Very simple cases work OK but that's about it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
THANKS for the reply. I was able to get the log plot working based on your suggestion.
The tick marks are still a problem. If I have some time--very unlikely anytime in the near future--maybe I'll dig into the phplot code and see if I fix this issue myself and then hand the fixed code over to y'all.
Thanks again,
James N
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using phplot-6.2.0 on a MacBook Pro running OS 10.13.5 and PHP Version 7.2.0 and I'm getting the warning in the subjectline, and I'm not sure why. The code I'm running that is causing the problem is:
$array_lin is a count($array_lin)>6,000 2D array, with floats for both elements. An example from the array is:
$array_lin['3899']['0'] = ""
$array_lin['3899']['1'] = 3
$array_lin['3900']['0'] = 10500
$array_lin['3900']['1'] = 1
$array_lin['3901']['0'] = ""
$array_lin['3901']['1'] = 4
I'm getting 5093 of the warnings, but there are only 6091 of the $array_lin['#']['0'] = "" entries, so I don't see the connection.
This code produces an image:
And while I have y'all's attention, I was wondering if someone could epxlian why the image's y-axis has no ticks between 1 and 1001--I would have expcted ticks for 10-1000.
Any help y'all can give me would be greatly appreciated.
Thanks,
James N
The image didn't seem to post, so here it is:
The message "expects integer, float given" is a little misleading. Normally the float given to imageline() is a whole number which gets silently converted to integer. In your case, mostly likely, the Y value is 0 or negative. For a log plot that gets you INF or NaN respectively, which cannot be converted to integer.
Check your data. You probably have some Y <= 0.0. Can't do that with a log plot.
As for tick marks, log plots have never been implemented that well. Very simple cases work OK but that's about it.
lbayuk,
THANKS for the reply. I was able to get the log plot working based on your suggestion.
The tick marks are still a problem. If I have some time--very unlikely anytime in the near future--maybe I'll dig into the phplot code and see if I fix this issue myself and then hand the fixed code over to y'all.
Thanks again,
James N