As usual, I will throw in using a Canvas( Tk, Goo, etc). They allow you full freedom in drawing and will output postscript. Goo will allow transparencies, and svg output. A simple Tk example:
#!/usr/bin/perl -w use strict; use Tk; my($o, $s) = (250, 20); my($pi, $x, $y) = (3.1415926, 0); my $mw = MainWindow->new; my $c = $mw->Canvas(-width => 500, -height => 500, -bg => 'white', )->pack; # make minimal axis set $c->createLine(50, 250, 450, 250); $c->createText(10, 250, -fill => 'blue', -text => 'X'); $c->createLine(250, 50, 250, 450); $c->createText(250, 10, -fill => 'blue', -text => 'Y'); # add some data for ($x = -(3*$pi); $x <= +(3*$pi); $x += 0.1) { $y = sin($x); $c->createText( $x*$s+$o, $y*$s+$o, -fill => 'red', -text => ':'); $y = cos($x); $c->createText( $x*$s+$o, $y*$s+$o, -fill => 'green', -text => '|' +); } $mw->Button( -text => "Save Postscript", -command => sub { $c->update; my @capture=(); my ($x0,$y0,$x1,$y1)=$c->bbox('all'); @capture=('-x'=>$x0,'-y'=>$y0,-height=>$y1-$y0,-width=>$x1-$x +0); $c -> postscript(-colormode=>'color', -file=>$0.'.ps', -rotate=>0, @capture); print "saved\n"; } )->pack; MainLoop;

I'm not really a human, but I play one on earth CandyGram for Mongo

In reply to Re: perl postscript by zentara
in thread perl postscript by baxy77bax

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.