[Discuss] PLplot and gnuplot
pw
p.willis at telus.net
Mon Mar 19 09:19:30 PST 2007
Alan W. Irwin wrote:
> On 2007-03-19 08:54-0700 pw wrote:
>
>> Out of curiosity, does PLplot allow a background colour other
>> than black? Printing black graphs is rather taxing on the printer ink.
>
> Yes, see
> http://plplot.sourceforge.net/docbook-manual/plplot-html-5.7.2/plscolbg.html.
>
> If you follow up links there, you will see the user naturally has complete
> control to change all colours from their default values. For example, the
> python scripts that manage my research plots have some boiler-plate code in
> them to provide the colours I prefer. In the future, we plan to put such
> boilerplate colour code into PLplot itself so that users have a convenient
> choice of different pre-built colour themes. But that colour theming code
> has not been implemented yet so currently each PLplot user has to put
> together colour schemes on their own.
>
> Getting back to octave PLplot support, I don't know the details, but there
> is a low-level octave PLplot API that was used to create the standard
> examples that I referred to before, and also a high-level octave PLplot API
> that is much more akin to what octave users expect (and probably close to
> what you had in mind) that wraps the low-level API. In the examples/octave
> directory the examples starting with "x" use the low-level API, and the
> examples starting with "p" use the high-level API. If you would like to
> add
> to the high-level API, I would be very happy to accept patches (subject to
> approval by our octave expert, of course). If you would like to see what
> some of those "p" examples look like, then simply use the -DBUILD_TEST=ON
> option to cmake followed by the "make" and "ctest --tests-regex octave"
> commands. ("ctest" on its own tests all examples for all interface
> languages,
> the --tests-regex octave option to that command just selects the octave
> language test).
>
> Alan
With respect to PLplot usage in Octave. I was referring to the Octave
examples on the PLplot webpages. The examples use PLplot as an API
rather than the 'plot' and 'axis' commands. It's alright to do it that
way, but for quick potting of some data, most Matlab refugees would
seek out plot and axis functions first.
I'd just leave the API as is and make a command line converter that
allows the the <program_path> variable 'gnuplot_binary=<program_path>'
in octaverc to simply be changed to gplot2pl.
Having the API option is good from that standpoint that PLplot also
allows more than just graphs to be rendered.
Peter
More information about the Discuss
mailing list