Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANN: Ada bindings to PLplot plotting software

18 views
Skip to first unread message

Jerry

unread,
Jan 2, 2009, 6:31:10 PM1/2/09
to
This is to announce the official availability of the Ada language
bindings to the plotting package PLplot as of version 5.9.1. See the
home page at http://plplot.sourceforge.net/. Available unofficially
for some time, the Ada bindings are now enabled by default.

PLplot is an actively developed project at SourceForge and should be
considered for high quality publication-grade plotting. It is a
linkable library and thus potentially faster than some other packages,
not requiring writing data to a file before plotting.

From the PLplot home page:
"PLplot is a cross-platform software package for creating scientific
plots. To help accomplish that task it is organized as a core C
library, language bindings for that library, and device drivers which
control how the plots are presented in non-interactive and interactive
plotting contexts."

"The PLplot core library can be used to create standard x-y plots,
semi-log plots, log-log plots, contour plots, 3D surface plots, mesh
plots, bar charts and pie charts. Multiple graphs (of the same or
different sizes) may be placed on a single page, and multiple pages
are allowed for those device formats that support them."

The Ada bindings offer a number of substantial improvements over the C
API, including a choice of binding, one using "traditional" PLplot
names such as plcol0(1) to set the pen color to red, the other using
"Ada-friendly" names such as Set_Color(Red).

The Ada bindings are extended to offer a host of "simple plotters"
that do not require user set-up and will suffice for many day-to-day
plotting needs. Here is an example:

with
PLplot_Auxiliary,
PLplot;
use
PLplot_Auxiliary,
PLplot;

procedure Simple_Example is
x, y : Real_Vector(-10 .. 10);
begin
for i in x'range loop
x(i) := Long_Float(i);
y(i) := x(i)**2;
end loop;

Initialize_PLplot; -- Call this only once.
Simple_Plot(x, y); -- Make the plot.
End_PLplot; -- Call this only once.
end Simple_Example;

There is also extensive Ada-specific documentation.


Platforms Supported:
Linux, Mac OS X, and other Unices
Windows (2000, XP and Vista)
MS-DOS (DJGPP)

Output File Formats:
CGM
GIF
JPEG
LaTeX
PBM
PDF
PNG
PostScript
SVG
Xfig

Interactive Platforms:
X
GNOME
Tcl/Tk
PyQt
wxWidgets

Language Bindings:
Ada
C/C++/D
Fortran 77/90
Java
OCaml
Octave
Perl
Python
Tcl/Tk
wxWidgets


Jerry Bauck

Georg Bauhaus

unread,
Jan 2, 2009, 7:34:01 PM1/2/09
to
Jerry wrote:
> This is to announce the official availability of the Ada language
> bindings to the plotting package PLplot as of version 5.9.1. See the
> home page at http://plplot.sourceforge.net/. Available unofficially
> for some time, the Ada bindings are now enabled by default.
[...]

> The Ada bindings offer a number of substantial improvements over the C
> API, including a choice of binding, one using "traditional" PLplot
> names such as plcol0(1) to set the pen color to red, the other using
> "Ada-friendly" names such as Set_Color(Red).

Skimming the PLplot examples, which are given for several
languages (http://plplot.sourceforge.net/examples.php),
I noticed that all examples mirror the fortranesque C library
functions more or less directly. (6char names with a "pl" prefix
making them 8char, tons of numeric parameters; I understand that
"these examples also serve as a testbed for the bindings in Ada
and other languages by checking the Postscript files that are
generated by each example against those generated by the C
versions.")

However, authors of some bindings including this Ada
one have added "a number of substantial improvements over
the C API". (Set_Color(Red) seems so much better than plcol0(1),
even when it does not name the thing that is turned red;
I don't want to sound complaining, in particular having
done nothing on this work). That's somewhat hidden
from the web presentation, though, I think.
Can I put an item on the Plplot binding wish list?
That would be: show some examples that use the thick
bindings, on the web pages. Maybe these examples using
thick bindings will then help some demonstrate why they are
using a language that offers more than Fortran 77 style C.

I'm still looking for an alternative for some Perl-driven
GNUplot command scripts, so I'm really happy to see PLplot
growing into the post-70s era ;-)

Jerry

unread,
Jan 5, 2009, 6:15:51 PM1/5/09
to
On Jan 2, 5:34 pm, Georg Bauhaus <see.reply...@maps.futureapps.de>
wrote:

> Jerry wrote:
> > This is to announce the official availability of the Ada language
> > bindings to the plotting package PLplot as of version 5.9.1. See the
> > home page athttp://plplot.sourceforge.net/. Available unofficially

> > for some time, the Ada bindings are now enabled by default.
>  [...]
> > The Ada bindings offer a number of substantial improvements over the C
> > API, including a choice of binding, one using "traditional" PLplot
> > names such as plcol0(1) to set the pen color to red, the other using
> > "Ada-friendly" names such as Set_Color(Red).

Thanks for your comments, Georg.

> However, authors of some bindings including this Ada
> one have added "a number of substantial improvements over
> the C API". (Set_Color(Red) seems so much better than plcol0(1),
> even when it does not name the thing that is turned red;
> I don't want to sound complaining, in particular having
> done nothing on this work).  That's somewhat hidden
> from the web presentation, though, I think.

Read the docs 8^). I originally called this procedure Set_Pen_Color
(..) but changed it when I figured that not everyone appreciates the
reference to pen plotters and would respond, "What pen?" Calling this
proc simply causes everything that is drawn thereafter to be in the
specified color, until the proc is called again with a different
argument.

> Can I put an item on the Plplot binding wish list?
> That would be: show some examples that use the thick
> bindings, on the web pages.  Maybe these examples using
> thick bindings will then help some demonstrate why they are
> using a language that offers more than Fortran 77 style C.

I couldn't agree with you more. In fact, I developed the "Ada-name"
binding first and made the "traditional-name" later at the request of
the PLplot developer team.

I'm very happy to report that I took your petition to the developers
and you should soon see Ada examples written with both bindings
appearing on the PLplot web site with the "Ada-name" versions given
preference if possible. I'll post back here when that upgrade happens.

> I'm still looking for an alternative for some Perl-driven
> GNUplot command scripts, so I'm really happy to see PLplot
> growing into the post-70s era ;-)

We try hard. 8^)

Jerry

unread,
Jan 6, 2009, 2:56:00 AM1/6/09
to

Jerry

unread,
Jan 6, 2009, 2:59:13 AM1/6/09
to
On Jan 5, 4:15 pm, Jerry <lancebo...@qwest.net> wrote:
> On Jan 2, 5:34 pm, Georg Bauhaus <see.reply...@maps.futureapps.de>
> wrote:
>
> > Jerry wrote:
> > However, authors of some bindings including this Ada
> > one have added "a number of substantial improvements over
> > the C API". (Set_Color(Red) seems so much better than plcol0(1),
> > even when it does not name the thing that is turned red;
> > I don't want to sound complaining, in particular having
> > done nothing on this work).  That's somewhat hidden
> > from the web presentation, though, I think.
>
> Read the docs 8^). I originally called this procedure Set_Pen_Color
> (..) but changed it when I figured that not everyone appreciates the
> reference to pen plotters and would respond, "What pen?" Calling this
> proc simply causes everything that is drawn thereafter to be in the
> specified color, until the proc is called again with a different
> argument.

Just for the record, I was at least temporarily stupid when I wrote
the above post(s). The actual procedure name is Set_Pen_Color, not
Set_Color. I can't explain the explanation 8^).

Jerry

Georg Bauhaus

unread,
Jan 7, 2009, 5:32:47 PM1/7/09
to
Jerry wrote:
> Ada examples written with both bindings

Excellent, thanks!

0 new messages