Oh woe is me. I pasted the wrong code example in the message. This is what should have been there:
#!/usr/bin/perl -w use Chart::Plot; use strict; my $img = Chart::Plot->new(); my @xdataset = qw(791.312 809.298 825.259 842.510 855.028 861.120 870. +554 870.977 877.036 893.436 1060.006 1066.030 1081.967 1270.989 2211. +105 2225.178 2239.090); my @ydataset = qw(1383.8 1863.9 1247 2191.4 2101.2 624.96 552.55 105 +0.3 690.71 538.11 705.84 566.41 397.68 133.13 158.5 91.587 82.42); $img->setData (\@xdataset, \@ydataset, 'nolines points'); $img->setGraphOptions ('horGraphOffset' => 75, 'vertGraphOffset' => 100, 'title' => 'Mass Spectrum', 'horAxisLabel' => 'mass/charge', 'vertAxisLabel' => 'intensity' ); open (WR,'>plot.png') or die ("Failed to write file: $!"); binmode WR; # for DOSish platforms print WR $img->draw(); close WR;

Sorry to waste your time once again. R


In reply to Re: Graphing non uniform data as bar charts by lostcause
in thread Graphing non uniform data as bar charts by lostcause

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.