Thank you for your replies

I will address both suggestions on this reply as they seem to be pretty much the same.

* Well, first of all, wouldn't you want to know just how much above 2 the value really is?

I do know what the value is because I have a table with those values along side the graph. But the main purpose of the graph is for my researchers to be able to compare different sets of values within the same scale.

* GD graphs are not very flexible, but you could come up with some hack to fix the problem. For instance, how about looping thru the data points and set any value greater than y_max to y_max, or even to zero. Then do the plot.
* One option, not elegant, would be to make use of the y_number_format method. I believe you can return strings here. You supply a function. In this case, if the number is between y_min and y_max, print the number. If it is above y_max print "above 2".

These are not the solutions. I need the value to be plotted correctly so that slope of the curve is as it should be. If I assign any data point value that is greater then y_max_value to y_max_value, the curve will be completely diferent.

What I really need is for GD::Graph to extrapolate and not really represent where the data point should be plotted. One solution would be to get rid of the graph title and draw a white rectangle above the top margin of the graph. Although not pretty, this would work.

Isn't there a method in GD::Graph that would make the plotting of the curve dependent on the y_max_value?

Once again, thank you for your replies

May Perl be with you

djodja


In reply to Re^2: Hide plotted data that exceeds y_max_value in graph produced by GD::Graph::Lines by djodja
in thread Hide plotted data that exceeds y_max_value in graph produced by GD::Graph::Lines by djodja

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.