Yes, both rotating the values and adding a grid is possible with just a few set commands. The following code, modified from Plot a spiral with gnuplot, does both.

use strict; use warnings; use 5.010; use IO::Handle; use File::Temp "tempfile"; my($T,$N) = tempfile("plot-XXXXXXXX", "UNLINK", 1); for my $t (100..500) { say $T $t*sin($t*0.1), " ", $t*cos($t*0.1); } open my $P, "|-", "gnuplot" or die; printflush $P qq[ unset key set xtics rotate by -45 #set grid # vertical and horizontal grid lines set grid xtics # vertical grid lines only plot "$N" with lines lw 3 ]; <STDIN>; close $P; __END__

Update: rotating the text is tricky in that some of the terminals (output drivers of gnuplot) does not support it, or only supports rotating by multiples of right angles. This may also depend on the version of gnuplot you have. Rotating the text by any angle does work in at least the postscript driver though.


In reply to Re: Two questions for GD::Graph by ambrus
in thread Two questions for GD::Graph by expresspotato

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.