comp.lang.ada
 help / color / mirror / Atom feed
* An easy way to simple scientific plots (in Ada)?
@ 2007-12-26 18:37 JPWoodruff
  2007-12-26 21:30 ` Jeffrey R. Carter
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: JPWoodruff @ 2007-12-26 18:37 UTC (permalink / raw)


I'm an old Ada hobbyist who would like to plot some data from a
computation. What I want is scientific plots that are sort of the
opposite of industrial strength, in that small effort produces small
result but has no aspiration to scale.

The kind of data I'll be examining are similar to
--
type data is array (min..max) of float;
X, Y : data ;
--
circle (X, Y : out data) ;
-- makes (max-min+1) values satisfying
--       x**2 + y**2 = 1;
plot_curve(X, Y) ; -- syntax to suit
-- puts a figure that's sort-of round into a window

I've collected beaucoup graphics libraries over the years - (claw,
gwindows, jewl, win_io, windex, once upon a time a fairly immature
gtkada...)

But I'm not a devotee of U-I programming so I've never committed much
thinking to any of these.  I'm going to stay uninvolved with buttons,
callbacks and dialogs.  Instead, I just like to compute and plot
numeric
values.  I wish I could do that in a context that didn't make me learn
all that stuff I'm not using.

By way of comparison, I consider my need alongside the capabilities of
the R language environment.  Their plotting far exceeds my needs.  But
the R language is a sad homely thing alongside Ada.

So can I ask for a suggestion: which library would be simplest for me
to install and use for my task?

Good fortune in the new year to all
John



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-26 18:37 An easy way to simple scientific plots (in Ada)? JPWoodruff
@ 2007-12-26 21:30 ` Jeffrey R. Carter
  2007-12-26 22:49   ` Manuel Collado
  2007-12-27  4:07   ` JPWoodruff
  2007-12-27  2:15 ` Jeffrey Creem
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 17+ messages in thread
From: Jeffrey R. Carter @ 2007-12-26 21:30 UTC (permalink / raw)


JPWoodruff@gmail.com wrote:
> I'm an old Ada hobbyist who would like to plot some data from a
> computation. What I want is scientific plots that are sort of the
> opposite of industrial strength, in that small effort produces small
> result but has no aspiration to scale.
> 
> I've collected beaucoup graphics libraries over the years - (claw,
> gwindows, jewl, win_io, windex, once upon a time a fairly immature
> gtkada...)
> 
> But I'm not a devotee of U-I programming so I've never committed much
> thinking to any of these.  I'm going to stay uninvolved with buttons,
> callbacks and dialogs.  Instead, I just like to compute and plot
> numeric
> values.  I wish I could do that in a context that didn't make me learn
> all that stuff I'm not using.
> 
> So can I ask for a suggestion: which library would be simplest for me
> to install and use for my task?

Package Plot_Windows from Win_IO seems to do what you want. It's small and easy 
to use, and doesn't require that you do anything different with the rest of your 
application.

-- 
Jeff Carter
"Alms for an ex-leper!"
Monty Python's Life of Brian
75



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-26 21:30 ` Jeffrey R. Carter
@ 2007-12-26 22:49   ` Manuel Collado
  2007-12-27  4:07   ` JPWoodruff
  1 sibling, 0 replies; 17+ messages in thread
From: Manuel Collado @ 2007-12-26 22:49 UTC (permalink / raw)


Jeffrey R. Carter escribi�:
> JPWoodruff@gmail.com wrote:
>> I'm an old Ada hobbyist who would like to plot some data from a
>> computation. What I want is scientific plots that are sort of the
>> opposite of industrial strength, in that small effort produces small
>> result but has no aspiration to scale.
>>
>> I've collected beaucoup graphics libraries over the years - (claw,
>> gwindows, jewl, win_io, windex, once upon a time a fairly immature
>> gtkada...)
>> ...
>> So can I ask for a suggestion: which library would be simplest for me
>> to install and use for my task?
> 
> Package Plot_Windows from Win_IO seems to do what you want. It's small 
> and easy to use, and doesn't require that you do anything different with 
> the rest of your application.

You could also try AdaGraph:

    http://users.ncrvnet.nl/gmvdijk/adagraph.html

Regards.
-- 
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-26 18:37 An easy way to simple scientific plots (in Ada)? JPWoodruff
  2007-12-26 21:30 ` Jeffrey R. Carter
@ 2007-12-27  2:15 ` Jeffrey Creem
  2007-12-27 13:56 ` Vadim Godunko
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 17+ messages in thread
From: Jeffrey Creem @ 2007-12-27  2:15 UTC (permalink / raw)


JPWoodruff@gmail.com wrote:
> I'm an old Ada hobbyist who would like to plot some data from a
> computation. What I want is scientific plots that are sort of the
> opposite of industrial strength, in that small effort produces small
> result but has no aspiration to scale.
> 
> The kind of data I'll be examining are similar to
> --
> type data is array (min..max) of float;
> X, Y : data ;
> --
> circle (X, Y : out data) ;
> -- makes (max-min+1) values satisfying
> --       x**2 + y**2 = 1;
> plot_curve(X, Y) ; -- syntax to suit
> -- puts a figure that's sort-of round into a window
> 
> I've collected beaucoup graphics libraries over the years - (claw,
> gwindows, jewl, win_io, windex, once upon a time a fairly immature
> gtkada...)
> 
> But I'm not a devotee of U-I programming so I've never committed much
> thinking to any of these.  I'm going to stay uninvolved with buttons,
> callbacks and dialogs.  Instead, I just like to compute and plot
> numeric
> values.  I wish I could do that in a context that didn't make me learn
> all that stuff I'm not using.
> 
> By way of comparison, I consider my need alongside the capabilities of
> the R language environment.  Their plotting far exceeds my needs.  But
> the R language is a sad homely thing alongside Ada.
> 
> So can I ask for a suggestion: which library would be simplest for me
> to install and use for my task?
> 
> Good fortune in the new year to all
> John

I usually just have the programs output data/config files for either 
gnuplot or xmgrace



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-26 21:30 ` Jeffrey R. Carter
  2007-12-26 22:49   ` Manuel Collado
@ 2007-12-27  4:07   ` JPWoodruff
  2007-12-27  9:10     ` Dmitry A. Kazakov
  2007-12-27 22:52     ` Jeffrey R. Carter
  1 sibling, 2 replies; 17+ messages in thread
From: JPWoodruff @ 2007-12-27  4:07 UTC (permalink / raw)


Original poster asks further advice after following Jeff's suggestion:

On Dec 26, 2:30 pm, "Jeffrey R. Carter"
<spam.jrcarter....@acm.nospam.org> wrote:
> JPWoodr...@gmail.com wrote:
> > I'm an old Ada hobbyist who would like to plot some data from a
> > computation.
> >  < .... >
>
> > So can I ask for a suggestion: which library would be simplest for me
> > to install and use for my task?
>
> Package Plot_Windows from Win_IO seems to do what you want. It's small and easy
> to use, and doesn't require that you do anything different with the rest of your
> application.


I tried to follow Jeff's suggestion - installed fresh new gtkada2.8
from adacore, then installed fresh Win_IO 3.0 from its source.

Sorry to say, result is very much as I recalled from nearly a year
ago:

test_plot_window compiles and links OK, but the elaboration of
Plot_Window_Type:=Plot_Window("Test Plot Window","Degrees","Value");

at the very beginning of that test program results in:

(test_plot_window.exe:4076): GLib-GObject-WARNING **: gsignal.c:1268:
parameter 2 of type `<unknown>' for signal
"GtkPlotCanvas::select_item" is not a value type

(test_plot_window.exe:4076): GLib-GObject-WARNING **: gsignal.c:1268:
parameter 1 of type `<unknown>' for signal "GtkPlotCanvas::move_item"
is not a value type

(test_plot_window.exe:4076): GLib-GObject-WARNING **: gsignal.c:1268:
parameter 1 of type `<unknown>' for signal
"GtkPlotCanvas::resize_item" is not a value type

(test_plot_window.exe:4076): GLib-GObject-WARNING **: gsignal.c:1268:
parameter 1 of type `<unknown>' for signal
"GtkPlotCanvas::delete_item" is not a value type

(test_plot_window.exe:4076): GLib-GObject-WARNING **: cannot retrieve
class for invalid (unclassed) type `<unknown>'

raised PROGRAM_ERROR : EXCEPTION_ACCESS_VIOLATION
-------------------------------------------------

(Some) other parts of the library appear to work properly.

I'd welcome some advice on this...

John



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-27  4:07   ` JPWoodruff
@ 2007-12-27  9:10     ` Dmitry A. Kazakov
  2007-12-27 18:19       ` JPWoodruff
  2007-12-27 22:52     ` Jeffrey R. Carter
  1 sibling, 1 reply; 17+ messages in thread
From: Dmitry A. Kazakov @ 2007-12-27  9:10 UTC (permalink / raw)


On Wed, 26 Dec 2007 20:07:29 -0800 (PST), JPWoodruff@gmail.com wrote:

> I tried to follow Jeff's suggestion - installed fresh new gtkada2.8
> from adacore, then installed fresh Win_IO 3.0 from its source.

For what it is worth, the latest available GtkAda is 2.10.

BTW, GtkAda has its own plotting widgets in Gtk.Extra.Plot

http://www.adacore.com/wp-content/files/auto_update/gtkada-docs/gtkada_rm/gtkada_rm/gtk-extra-plot.html

When I tried it it worked. (Though I ended up with writing my own widget
because I needed highlighting, filling under the curves and other specific
feature, nevertheless). From what can see Win_IO uses the same widget.

http://www.ctr.unican.es/win_io/

So there should be some version incompatibilities. Win_IO refers to GtkAda
2.4. I think you should ask the maintainers to review the code in order to
make it compatible with 2.10.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-26 18:37 An easy way to simple scientific plots (in Ada)? JPWoodruff
  2007-12-26 21:30 ` Jeffrey R. Carter
  2007-12-27  2:15 ` Jeffrey Creem
@ 2007-12-27 13:56 ` Vadim Godunko
  2007-12-29 22:28   ` I. Levashew
  2007-12-27 20:23 ` Jerry
  2008-01-01 20:58 ` Gautier
  4 siblings, 1 reply; 17+ messages in thread
From: Vadim Godunko @ 2007-12-27 13:56 UTC (permalink / raw)


On Dec 26, 9:37 pm, JPWoodr...@gmail.com wrote:
>
> I've collected beaucoup graphics libraries over the years - (claw,
> gwindows, jewl, win_io, windex, once upon a time a fairly immature
> gtkada...)
>
Jet another option today is QtAda. Elastic Nodes example may be
interesting for you.

http://www.qtada.com/

Unfortunately, it involve you into usual GUI development, but Qt's
scene/view framework provide many powerful features.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-27  9:10     ` Dmitry A. Kazakov
@ 2007-12-27 18:19       ` JPWoodruff
  0 siblings, 0 replies; 17+ messages in thread
From: JPWoodruff @ 2007-12-27 18:19 UTC (permalink / raw)


On Dec 27, 2:10 am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
> On Wed, 26 Dec 2007 20:07:29 -0800 (PST), JPWoodr...@gmail.com wrote:
> > I tried to follow Jeff's suggestion - installed fresh new gtkada2.8
> > from adacore, then installed fresh Win_IO 3.0 from its source.
>
> For what it is worth, the latest available GtkAda is 2.10.


> So there should be some version incompatibilities. Win_IO refers to GtkAda
> 2.4.

I was a little bit thoughtful about that when I chose 2.8 before
2.10.

My short look did not show me a v2.4

> I think you should ask the maintainers to review the code in order to
> make it compatible with 2.10.
>

That's going to me my next plan.
John



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-26 18:37 An easy way to simple scientific plots (in Ada)? JPWoodruff
                   ` (2 preceding siblings ...)
  2007-12-27 13:56 ` Vadim Godunko
@ 2007-12-27 20:23 ` Jerry
  2007-12-28 19:53   ` JPWoodruff
  2008-01-01 20:58 ` Gautier
  4 siblings, 1 reply; 17+ messages in thread
From: Jerry @ 2007-12-27 20:23 UTC (permalink / raw)


On Dec 26, 11:37 am, JPWoodr...@gmail.com wrote:
> I'm an old Ada hobbyist who would like to plot some data from a
> computation. What I want is scientific plots that are sort of the
> opposite of industrial strength, in that small effort produces small
> result but has no aspiration to scale.
>
> The kind of data I'll be examining are similar to
> --
> type data is array (min..max) of float;
> X, Y : data ;
> --
> circle (X, Y : out data) ;
> -- makes (max-min+1) values satisfying
> --       x**2 + y**2 = 1;
> plot_curve(X, Y) ; -- syntax to suit
> -- puts a figure that's sort-of round into a window
>
> I've collected beaucoup graphics libraries over the years - (claw,
> gwindows, jewl, win_io, windex, once upon a time a fairly immature
> gtkada...)
>
> But I'm not a devotee of U-I programming so I've never committed much
> thinking to any of these.  I'm going to stay uninvolved with buttons,
> callbacks and dialogs.  Instead, I just like to compute and plot
> numeric
> values.  I wish I could do that in a context that didn't make me learn
> all that stuff I'm not using.
>
> By way of comparison, I consider my need alongside the capabilities of
> the R language environment.  Their plotting far exceeds my needs.  But
> the R language is a sad homely thing alongside Ada.
>
> So can I ask for a suggestion: which library would be simplest for me
> to install and use for my task?
>
> Good fortune in the new year to all
> John

In my opinion, PLplot is exactly what you need. (I wrote the Ada
bindings so my opinion may be biased 8^).

PLplot is a fully-featured 2D and 3D plotting package with output
suitable for publication. Output can go to any of a number of devices
as well as to a variety of graphics files including Postscript. The
development activity is very high the mailing list is very responsive.

When I wrote the Ada bindings, I added a number of "simple plotters"
for various plot types because I didn't want to have to do a bunch of
set-up every time I wanted to make a plot--these "simple plotters" are
not present in other bindings. But note that all of the PLplot
functionality is available if you want to use it.

Here is a very short example program that makes a plot:


with
    Ada.Numerics.Long_Real_Arrays,
    PLplot,
    PLplot_Auxiliary;
use
    Ada.Numerics.Long_Real_Arrays,
    PLplot,
    PLplot_Auxiliary;

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

    Initialize_PLplot;
    Simple_Plot(x, y); -- One call to make the plot.
    End_PLplot;
end simplest;


Note that there are only an initialization and a finalization call as
overhead. (These are standard and not part of my "simple plotters."
After that, the plot is generated with only one call, as you
specified.

This particular "simple plotter" can contain a few more arguments so
it is not quite as limited as one might think. For example, with
suitably filled-out arrays, the plotter call might look like this:

    Simple_Plot(x, y1, y2, y3, y4, y5, "x label", "y label", "Page
Title");

I should mention that the plotter is built for either Ada 2005 or non-
Ada-2005 compilers. If your compiler is Ada 2005 (and thus Annex G.3
compliant, meaning that it has vector and matrix definitions), then it
will recognize the type Real_Vector etc.; otherwise, that type is
defined for you in the binding and your code will look the same.

PLplot works without GUI programming. You can specify arguments to it
when you call it such as output device, number of plots per page, etc.
(not shown in the above example). I usually don't do that so when
PLplot is initialized it will ask you at the command line to select
your output device which requires just one keystroke plus Return.

PLplot does not write data to disk in order to first plot it (like
gnuplot) but uses your own data as it exists within the running
program. This is a small matter but could make a speed difference on
large data sets.

Jerry



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-27  4:07   ` JPWoodruff
  2007-12-27  9:10     ` Dmitry A. Kazakov
@ 2007-12-27 22:52     ` Jeffrey R. Carter
  1 sibling, 0 replies; 17+ messages in thread
From: Jeffrey R. Carter @ 2007-12-27 22:52 UTC (permalink / raw)


JPWoodruff@gmail.com wrote:
> 
> I tried to follow Jeff's suggestion - installed fresh new gtkada2.8
> from adacore, then installed fresh Win_IO 3.0 from its source.

I've never had any trouble with Win_IO, but then I'm using GtkAda 2.4, since 
that's the last GMGPL version I could find for Windows. Further 2.x versions of 
GtkAda have not been backward compatible.

If you're using Windows, I could send you GtkAda 2.4. Otherwise, you could try 
to upgrade Win_IO, or use an alternative (PLplot may be suitable).

-- 
Jeff Carter
"Mr. President, we must not allow a mine-shaft gap!"
Dr. Strangelove
33



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-27 20:23 ` Jerry
@ 2007-12-28 19:53   ` JPWoodruff
  2007-12-30 21:25     ` Jerry
  0 siblings, 1 reply; 17+ messages in thread
From: JPWoodruff @ 2007-12-28 19:53 UTC (permalink / raw)


On Dec 27, 1:23 pm, Jerry <lancebo...@qwest.net> wrote:
> On Dec 26, 11:37 am, JPWoodr...@gmail.com wrote:
>
>
>
> > I'm an old Ada hobbyist who would like to plot some data from a
> > computation.


>
> In my opinion, PLplot is exactly what you need.

Sounds like something I'd like to try.   But google doesn't tell me
(at least not directly) how to find it.

Reminds me of my friend who says "I'll buy you a beer" but doesn't say
when ;-)

--

Also thanks Jeffrey Creem for reminding me of gnuplot.   I'm getting
good early results with that.

John



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-27 13:56 ` Vadim Godunko
@ 2007-12-29 22:28   ` I. Levashew
  2007-12-30 18:40     ` JPWoodruff
  0 siblings, 1 reply; 17+ messages in thread
From: I. Levashew @ 2007-12-29 22:28 UTC (permalink / raw)


Vadim Godunko wrote:

> Jet another option today is QtAda. Elastic Nodes example may be
> interesting for you.
> 
> http://www.qtada.com/

Especially for Qt:

http://qwt.sourceforge.net/index.html

No bindings yet.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-29 22:28   ` I. Levashew
@ 2007-12-30 18:40     ` JPWoodruff
  0 siblings, 0 replies; 17+ messages in thread
From: JPWoodruff @ 2007-12-30 18:40 UTC (permalink / raw)


On Dec 29, 3:28 pm, "I. Levashew" <octag...@bluebottle.com> wrote:
> Vadim Godunko wrote:
> > Jet another option today is QtAda. Elastic Nodes example may be
> > interesting for you.
>
> >http://www.qtada.com/
>
> Especially for Qt:
>
> http://qwt.sourceforge.net/index.html
>
> No bindings yet.

That qwt makes awesome plots.

Back in the day when I needed such things professionally I'd have
looked it over carefully.  I'd be happy to encourage you with your Ada
bindings work.

I want to keep a limit on how much graphics I have to think about, so
qt is more than I'll pursue.  But I'm glad you showed it to me.

John



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-28 19:53   ` JPWoodruff
@ 2007-12-30 21:25     ` Jerry
  2007-12-31  3:40       ` JPWoodruff
  0 siblings, 1 reply; 17+ messages in thread
From: Jerry @ 2007-12-30 21:25 UTC (permalink / raw)


On Dec 28, 12:53 pm, JPWoodr...@gmail.com wrote:
> On Dec 27, 1:23 pm, Jerry <lancebo...@qwest.net> wrote:
>
> > On Dec 26, 11:37 am, JPWoodr...@gmail.com wrote:
>
> > > I'm an old Ada hobbyist who would like to plot some data from a
> > > computation.
>
> > In my opinion, PLplot is exactly what you need.
>
> Sounds like something I'd like to try.   But google doesn't tell me
> (at least not directly) how to find it.
>
> Reminds me of my friend who says "I'll buy you a beer" but doesn't say
> when ;-)
>
> --
>
> Also thanks Jeffrey Creem for reminding me of gnuplot.   I'm getting
> good early results with that.
>
> John

I'm not sure what to say--just type PLplot into Google and the top hit
is "PLplot Home Page." Just in case, the link is http://plplot.sourceforge.net/.

If you try PLplot for Ada, let me know your impression. I've never
really announced the availability of the Ada binding and the PLplot
team officially considers the Ada binding to be "experimental" but
mainly because I haven't converted all 28 of their examples from C to
Ada, only a few. They sort of consider the ability to run all of the
examples as a good test of a binding.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-30 21:25     ` Jerry
@ 2007-12-31  3:40       ` JPWoodruff
  2007-12-31 10:02         ` Jerry
  0 siblings, 1 reply; 17+ messages in thread
From: JPWoodruff @ 2007-12-31  3:40 UTC (permalink / raw)


On Dec 30, 2:25 pm, Jerry <lancebo...@qwest.net> wrote:
> On Dec 28, 12:53 pm, JPWoodr...@gmail.com wrote:
>
>
>
> > On Dec 27, 1:23 pm, Jerry <lancebo...@qwest.net> wrote:
>
> > > On Dec 26, 11:37 am, JPWoodr...@gmail.com wrote:
>
> > > > I'm an old Ada hobbyist who would like to plot some data from a
> > > > computation.
>
> > > In my opinion, PLplot is exactly what you need.
>
> > Sounds like something I'd like to try.   But google doesn't tell me
> > (at least not directly) how to find it.
>
> > Reminds me of my friend who says "I'll buy you a beer" but doesn't say
> > when ;-)
>
> > --
>
> > Also thanks Jeffrey Creem for reminding me of gnuplot.   I'm getting
> > good early results with that.
>
> > John
>
> I'm not sure what to say--just type PLplot into Google and the top hit
> is "PLplot Home Page."

I guess what I say now is "duh".  But when I do "plplot Ada", google
gets pretty vague.

With your suggestion, I downloaded plplot5.8 and had a look.  There's
quite a lot of C there, and I'm pretty C-averse. (I managed to avoid
learning it for work for 30-odd years, so I'll just continue like
that.)

I want to keep a limit on how much graphics I have to think about, so
plplot is more than I'll pursue.  I'm glad you showed it to me and I
hope you'll continue to make it into a successful product.

John



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-31  3:40       ` JPWoodruff
@ 2007-12-31 10:02         ` Jerry
  0 siblings, 0 replies; 17+ messages in thread
From: Jerry @ 2007-12-31 10:02 UTC (permalink / raw)


On Dec 30, 8:40 pm, JPWoodr...@gmail.com wrote:
> On Dec 30, 2:25 pm, Jerry <lancebo...@qwest.net> wrote:
>
>
>
> > On Dec 28, 12:53 pm, JPWoodr...@gmail.com wrote:
>
> > > On Dec 27, 1:23 pm, Jerry <lancebo...@qwest.net> wrote:
>
> > > > On Dec 26, 11:37 am, JPWoodr...@gmail.com wrote:
>
> > > > > I'm an old Ada hobbyist who would like to plot some data from a
> > > > > computation.
>
> > > > In my opinion, PLplot is exactly what you need.
>
> > > Sounds like something I'd like to try.   But google doesn't tell me
> > > (at least not directly) how to find it.
>
> > > Reminds me of my friend who says "I'll buy you a beer" but doesn't say
> > > when ;-)
>
> > > --
>
> > > Also thanks Jeffrey Creem for reminding me of gnuplot.   I'm getting
> > > good early results with that.
>
> > > John
>
> > I'm not sure what to say--just type PLplot into Google and the top hit
> > is "PLplot Home Page."
>
> I guess what I say now is "duh".  But when I do "plplot Ada", google
> gets pretty vague.
>
> With your suggestion, I downloaded plplot5.8 and had a look.  There's
> quite a lot of C there, and I'm pretty C-averse. (I managed to avoid
> learning it for work for 30-odd years, so I'll just continue like
> that.)
>
> I want to keep a limit on how much graphics I have to think about, so
> plplot is more than I'll pursue.  I'm glad you showed it to me and I
> hope you'll continue to make it into a successful product.
>
> John

Thanks for taking a look at PLplot. I'm as averse to C as you are (I
learned just enough to do the binding). But the point of having the
Ada binding is so that Ada programmers don't have to look at C at all.
I guess when you look at the documentation the function calls are in
C, but once you find the function you need, just look at the Ada
version in the spec file and you're good to go. And the Ada-only
"simple plotters" have no C corollaries at all. I do intend to write
some documentation for the Ada binding at some point, however. But
really, for an most Ada programmers, just look at the specs.

Jerry



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: An easy way to simple scientific plots (in Ada)?
  2007-12-26 18:37 An easy way to simple scientific plots (in Ada)? JPWoodruff
                   ` (3 preceding siblings ...)
  2007-12-27 20:23 ` Jerry
@ 2008-01-01 20:58 ` Gautier
  4 siblings, 0 replies; 17+ messages in thread
From: Gautier @ 2008-01-01 20:58 UTC (permalink / raw)


JPWoodruff@gmail.com:

...
 > The kind of data I'll be examining are similar to
 > --
 > type data is array (min..max) of float;
 > X, Y : data ;
 > --
 > circle (X, Y : out data) ;
 > -- makes (max-min+1) values satisfying
 > --       x**2 + y**2 = 1;
 > plot_curve(X, Y) ; -- syntax to suit
 > -- puts a figure that's sort-of round into a window
...
> So can I ask for a suggestion: which library would be simplest for me
> to install and use for my task?

Maybe you'll be happy with that one:

   http://homepage.sunrise.ch/mysunrise/gdm/graph.htm

All drawing primitives are in two variants: pixel coords (Integer) and coords in 
a virtual rectangle (Float) the corners of which you assign those of your 
window, screen or postscript sheet. It performs line clipping, so you can draw 
everything without fear of getting a part outside of the "borders"...

For Windows, it runs on top of AdaGraph (so you need to install both), but could 
be plugged into any basic graphics system.

Cheers
Gautier



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2008-01-01 20:58 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-26 18:37 An easy way to simple scientific plots (in Ada)? JPWoodruff
2007-12-26 21:30 ` Jeffrey R. Carter
2007-12-26 22:49   ` Manuel Collado
2007-12-27  4:07   ` JPWoodruff
2007-12-27  9:10     ` Dmitry A. Kazakov
2007-12-27 18:19       ` JPWoodruff
2007-12-27 22:52     ` Jeffrey R. Carter
2007-12-27  2:15 ` Jeffrey Creem
2007-12-27 13:56 ` Vadim Godunko
2007-12-29 22:28   ` I. Levashew
2007-12-30 18:40     ` JPWoodruff
2007-12-27 20:23 ` Jerry
2007-12-28 19:53   ` JPWoodruff
2007-12-30 21:25     ` Jerry
2007-12-31  3:40       ` JPWoodruff
2007-12-31 10:02         ` Jerry
2008-01-01 20:58 ` Gautier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox