djodja has asked for the wisdom of the Perl Monks concerning the following question:
Omshanti
I have a query related to the plotting of data through GD::Graph.
I have set the y_max_value, which defines the y axis scale of the graph in question to the value of 2.
This graph or should I say these graphs are being rendered dynamically through a CGI script on a webpage. For most of the data sets the graphs plot the data beautifully. Alas, for some, because some of the data points being above 2, the line is rendered above the y_max_value. Here is the code for the graph:
my @logConc; my @data; my @forGraph = (\@logConc,\@data); #end debug my $graph = GD::Graph::lines->new(500,300); $graph->set( x_label => 'Loged stuff', y_label => 'Intensity', title => "Plot of $cell_name (row $plateRow)", line_width => 1, legend_spacing => 5, x_tick_number => 'auto', box_axis => 0, y_min_value => 0, y_max_value => 2, transparent => 0 ) or die $graph->error; $graph->set_legend($cell_line_name); my $format = $graph->export_format; print header("image/$format"); binmode STDOUT; print $graph->plot(\@forGraph)->$format();
@logConc are the X values and @data are the values to be plotted.
Is there anyway for me to hide the plotted line above a certain threshold?
Namaste
Djodja
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hide plotted data that exceeds y_max_value in graph produced by GD::Graph::Lines
by zentara (Cardinal) on Feb 16, 2010 at 17:36 UTC | |
|
Re: Hide plotted data that exceeds y_max_value in graph produced by GD::Graph::Lines
by Illuminatus (Curate) on Feb 16, 2010 at 20:30 UTC | |
by djodja (Initiate) on Feb 17, 2010 at 10:11 UTC | |
by BrowserUk (Patriarch) on Feb 17, 2010 at 11:23 UTC | |
|
Re: Hide plotted data that exceeds y_max_value in graph produced by GD::Graph::Lines
by zentara (Cardinal) on Feb 17, 2010 at 13:46 UTC |