Bug #4522 Image_Graph_Axis::_calcLabelInterval() dont work like it was working before
Submitted: 2005年06月03日 18:20 UTC
From: sebhtml at users dot sourceforge dot net Assigned:
Status: Bogus Package: Image_Graph
PHP Version: 4.3.11 OS: Slackware 10
Roadmaps: (Not assigned)
Subscription


[2005年06月03日 18:20 UTC] sebhtml at users dot sourceforge dot net
Description: ------------ Look at the expected result and actual result. The automatic interval don 't work... I can't set it manually because all users have a max-min that is different... When I was using Image_Graph 0.3.0, the histograms were not working , but the automatic interval was working. I checked the code and it it not the same for the method Image_Graph_Axis::_calcLabelInterval() --sebhtml Reproduce code: --------------- The code to reproduce the bug is : http://www.spockcorgis.com/biologie/Correlation_plot.phps (this is a class) and the code that use the class : http://www.spockcorgis.com/biologie/time_vs_score_img.phps Expected result: ---------------- If I set manually the interval, it looks like this : http://www.spockcorgis.com/biologie/time_vs_score_img2.png Actual result: -------------- The actual result look like this : http://www.spockcorgis.com/biologie/time_vs_score_img.png

Comments

[2005年06月03日 18:41 UTC] pear dot nosey at veggerby dot dk
Actually it works as designed (as far as I can see)... The only discrepancy is that I'd have said this thing was changed prior to 0.3.0, but I _do_ think it is the "culprit": The "problem" lies in that the default x-axis is now not a linear scale axis but a category axis (i.e. the actual x-values are distributed equally in-order-of-dataset on the axis), this also means that auto-labelinterval calculations aren't used on the x-axis - all values are shows by default! What you can do to remedy this is : 1) Make the graph use a linear x-axis as in the old days, by specifying the axis "types" as parameters on the plotarea constructor: $Plotarea = new Image_Graph_Plotarea("axis", "axis"); 2) Use setLabelInterval() on the x-axis, which leeds me to: You should not access methods or attributes that are named starting with an _ (underscore) they are private (pseudo- since PHP4 has no method/attribute visibility). There is a method setLabelOptions() for accessing the _labelOptions attribute (not that it makes any difference in this case, but visibility is there for _me_ as a provider of the class to be able to always be certain of the class' inner state, which cannot be guaranteed if you fiddle with the private variables :)) Hope this helps you on your path... regards Jesper
[2005年06月03日 21:03 UTC] sebhtml at yahoo dot ca
Thank you very much!!!!!!
[2006年12月27日 05:21 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE. Write a message to pear-dev@lists.php.net
to request the confirmation link. All bugs/comments/patches associated with this
email address will be deleted within 48 hours if the account request is not confirmed!

AltStyle によって変換されたページ (->オリジナル) /