pgplot is very powerful and you can configure it in almost any way,
but for that I am
afraid you will have to use the "low" level pgplot routines for this.
They are not difficult to use.
As far as I can remember, last time I used gnuplot was some 10 years
ago, pgplot was much
more powerful and versatile than gnuplot. For this purpose I would
recomend to stick with
pgplot (unless again gnuplot has improved so much that is better than pgplot)
Have a look at http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html
Of course, another option is to use plplot which is very similar to
pgplot and more up to date.
Here is the program that will do the trick for you:
#!/usr/bin/env perl
use PDL;
use PDL::Graphics::PGPLOT::Window;
use PDL::Graphics::LUT;
use PGPLOT;
$w=pgwin('/xserve');
pgscr(0,1,1,1);
pgscr(1,0,0,0);
pgslct(1);
pgsvp(0.1,0.9,0.15,0.9);
pgswin(170,290,log10(1020),log10(7));
pgsci(8);
pgslw(4);
pgbox('BCNST',0,0,'BCNSTL',0,0);
pgsci(4);
pgslw(1);
pgsls(4);
pgbox('G',0,0,'G',0,0);
$w->hold;
pgsci(2);
pglab('T, T\ddew\u (K)','p (hPa)',$dates[$idate]);
Note the pgsci commands which change color, pgslw which changes line width and
pgsls which changes line style
Cheers
Xavier
On Mon, Mar 9, 2009 at 9:50 PM, Art Davis <[email protected]> wrote:
> Ultimately I need to place some 2-D plots in my LaTex publication.
>
> I played with PGPLOT for a while, but I wasn't able to figure out how to
> make the color/linestyle of the grid different from the axes and labels (I
> strongly prefer a light gray grid color with black axes and tic labels).
> Also I really want fine control over the tic locations which doesn't seem
> possible at least with the high-level PGPLOT commands. I suspect it's doable
> with low-level type commands; but my efforts are slow going in figuring
> these out.
>
> So I changed up my workflow plan to proceed with PDL/PGPLOT for analysis and
> then export my final datasets to text files for plotting in Gnuplot ->
> PSTricks -> LaTeX. This strategy is solid; but slightly above my laziness
> threshold. This means I've comitted all my resources to figuring out how to
> skip PGPLOT and do both my analysis and publication graphics with Gnuplot.
>
> I've had pretty good success using the GnuplotIF perl module. Of course I
> have to flatten piddles into perl lists before shipping them off to Gnuplot
> using list(). The problem is sporadic data corruption. Sometimes all the
> data gets through, sometimes not. Large datasets are a disaster. For
> example, 100 datapoints may get through uncorrupted one time. Then if I
> resend the same data data a few times, I'm likely to get a couple of points
> dropped. If I send 5000 datapoints, the plot is severely messed up.
>
> The workaround that I've found is to dump the data to a temporary text file
> with wcols() and then use the Gnuplot interface to open that text file back
> up. It feels a little sloppy but that's what I'm going to stick with for
> now.
>
> I welcome comments on anything. The code in GnuplotIF.pm looks OK to my eyes
> and the glitch occurrence is not consistent. I'm not sure how to debug the
> problem further but if this is at all interesting to someone more code savvy
> than myself, feel free to let me know what you find. Also, I'd be interested
> to know if the problem even exists anywhere else besides my computer and/or
> os platform (Activestate/Windows XP environment).
>
> The problem should be reproducible with this code:
> http://pastebin.com/m809dc15
> For me, setting $npoints to 100 will drop data only occasionally. Bumping
> the value up to 500 or 1000 messes things up pretty quickly.
>
> And to give you an idea what I'm going for, see here:
> http://img520.imageshack.us/img520/395/sinctest.png
> If I set the output to PSTricks in Gnuplot and send this graph through LaTeX
> I can get a nice publication ready rendering. I'm also interested in any
> thoughts on accomplishing this sort of thing with PGPLOT.
>
> Thanks!
> --Art
>
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl