Menu

Set dimensions of axis

Anonymous
2010-09-02
2012-09-07
  • Anonymous

    Anonymous - 2010-09-02

    Hi everybody!

    I'm just starting to use phplot and I like it!

    I'm just missing the funtionality of setting the dimensions of the y-axis by
    hand. In my case I'm having values between 0 and 100 and I want my graph to
    scale the y-axis to a minimum of 0 and a maximum of 100 instead of calculating
    it between the minimum and maximum given values.

    I found the FindDataLimits()-function which does just this, but there seems to
    be no way of setting the values for $this->min_y and $this->max_y from outside
    the class. Is this function not implemented (yet) or am I not able to find it?

    Regards,

    Benni Graf.

     
  • lbayuk

    lbayuk - 2010-09-02

    Hi! Please don't call FindDataLimits(), as it is an "internal" function and
    will soon change to protected scope. If I understand what you are asking, you
    simply want to use SetPlotAreaWorld(). For example, if you want to auto-range
    X but fix the Y range at 0 to 100, then leave the X range settings at NULL and
    specify just Ymin and Ymax like this:

    $plot->SetPlotAreaWorld(NULL, 0, NULL, 100)
    
     
  • Anonymous

    Anonymous - 2010-09-03

    Hi!

    Thanks, that was indeed the function I was looking for.

    (BTW, I wasn't intending to call FindDataLimits from the outside, don't worry
    ;-)

    Regards,

    Benni.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.