Graphics support in PDL is consolidating. In the past there have been several modules that work with difficulty, and also several attempts to unify them. Thank you for this clear summary of the muddle in the documentation!
The PGPLOT and PLplot modules were the first that were adapted to PDL. The Gnuplot and Prima modules are newer. Gnuplot produces prettier output than PGPLOT and PLplot, but occupies about the same niche of static plotting. Prima can do static plotting, but really shines at dynamic plotting (i.e. dynamic display of data as you manipulate them) - this is a surprising development, and it is well worth running the Prima demo from the PDL shell to see what it can do. Simple is intended to be the go-to module for static plotting for a rank beginner, and in fact the first chapter of the PDL book was recently revised to reflect that. It is not a graphics module in itself, only a uniform interface to the others. Simple has the advantage that if any one of the other modules compiles properly on your system (this has been a problem in the past, but is not so much a problem these days), you can start looking at your data immediately. It also lets you try out different graphics modules: if you install them all in your system you can compare the look of the finished product from each fairly simply. Cheers, Craig On Mar 26, 2013, at 7:23 AM, Pierre M <[email protected]> wrote: > Hello, > question from a PDL beginner: > > which 2D Graphics module should i use? > > I know, this is Perl, "there are several ways to do it", and maybe i > should read the doc and try them all. But there are many, and i found > contradictory information online even though it all seems to be recent > and "official" information from the developers team. Maybe this can be > clarified. > > In this recent and apparently "official" blog post > http://blogs.perl.org/users/joel_berger/2013/03/pdl-2006-released.html > these three are mentionned: > - PDL::Graphics::Gnuplot > - PDL::Graphics::Prima > - PDL::Graphics::Simple > It seems that the last one is best to use, as it "uses many of the > existing PDL graphics modules with a uniform syntax". > And if it doesn’t do some of the things that i need, i should then > look at the other ones. Is that right? > > But i am still confused, because in the PDL documentation here > http://pdl.perl.org/?docs=Modules&title=PDL::Modules#graphics > the only two Graphical modules that are indicated are > - PDL::Graphics::PGPLOT > - PDL::Graphics::PLplot > which are also the ones presented in the PDL Book. > > Is any of these two sources of information more up to date than the > other one, or is it just that the 5 modules should be mentioned in > both places? (this blog and the documentation) In which case it would > be very helpful for beginners to have a short > summary/comparison/review that would indicate what each can do or > cannot. > ...Or, that would just say that they do exactly the same thing, so > just use you the first you manage to install - if this was the case. > > And then i also just found PDL::Graphics2D, whose documentation says > “This is an umbrella class allowing for a simple interface to all > plotting routines in PDL”. This sounds very similar to what > PDL::Graphics::Simple is meant to do. But it also says: “This requires > a lot more work before it is useful I feel, but it can be used > already”. And indeed, it only has one function at the moment. But it > is presented in the PDL Book, even though it does not figure in its > summary. > So, that would be 6 modules to compare. > > This is not meant to be a negative message: i am only seeking for > clarification on where to best start with plots. > And the answer, if it is compiled and displayed somewhere, might help > some other beginners too. If i get a clear picture from people's > answers, I will write a summary that can be used on the website. > > Cheers for any insight on this :-) > Pierre > > > PS: Something else: it would be very helpful to add in the PDL Book’s > summary, the page number where each chapter can be found. > > ~ ~ ~ ~ ~~ > I initially posted this message in this blog: > http://blogs.perl.org/users/joel_berger/2013/03/pdl-2006-released.html#comment-442449 > and thought today that it would be best to share it with more PDL > users over the mailing list. > > _______________________________________________ > 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
