From 34f90f9172f9c1c5040ed3020bbac5bf37fcc3f8 Mon Sep 17 00:00:00 2001 From: othocaeS Date: Thu, 16 Jun 2016 15:44:27 -0400 Subject: [PATCH] still figuring out best way to script plotting --- scripts/extract_power_curve.pl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/extract_power_curve.pl b/scripts/extract_power_curve.pl index ace7328..b933d89 100755 --- a/scripts/extract_power_curve.pl +++ b/scripts/extract_power_curve.pl @@ -1,4 +1,17 @@ #!/usr/local/bin/perl -use PDL::Graphics::Gnuplot; -gplot( xvals(5)**2 ); \ No newline at end of file +use Graphics::GnuplotIF; +my $plot = Graphics::GnuplotIF->new ( + style => 'histogram', # one of the gnuplot line styles (see below) + title => "$mytitle", # string + xlabel => '$myxlabel', # string + ylabel => '$myylabel', # string + xrange => [@myxrange], # array reference; autoscaling, if empty + yrange => [@myyrange], # array reference; autoscaling, if empty + plot_titles => [ "$titles" ], # array of strings; titles used in the legend + persist => 0, # let plot windows survive after gnuplot exits + # 0 : close / 1 : survive + ); + + $plot_glacier->gnuplot_plot_xy ( \@x, \@y ); + $plot_glacier->gnuplot_pause();