comp.lang.ada
 help / color / mirror / Atom feed
* Cairo graphics library
@ 2011-08-05  5:53 Ada novice
  2011-08-05  7:17 ` Dmitry A. Kazakov
  2011-08-11 23:27 ` Jerry
  0 siblings, 2 replies; 7+ messages in thread
From: Ada novice @ 2011-08-05  5:53 UTC (permalink / raw)


I've read that GNAT 2011 has an interface to the Cairo graphics
library. Can we use this library to plot graphs with Ada? By graphs I
mean 2-dimensional plots with lines and curves (to start with).

Thanks.

YC



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

* Re: Cairo graphics library
  2011-08-05  5:53 Cairo graphics library Ada novice
@ 2011-08-05  7:17 ` Dmitry A. Kazakov
  2011-08-11  4:51   ` Ada novice
  2011-08-11 23:27 ` Jerry
  1 sibling, 1 reply; 7+ messages in thread
From: Dmitry A. Kazakov @ 2011-08-05  7:17 UTC (permalink / raw)


On Thu, 4 Aug 2011 22:53:56 -0700 (PDT), Ada novice wrote:

> I've read that GNAT 2011 has an interface to the Cairo graphics
> library.

It is announced as a part of GtkAda, but I didn't see it in a distribution.

However there exist other bindings to Cairo, which I am currently using:

   http://sourceforge.net/projects/cairoada/

> Can we use this library to plot graphs with Ada? By graphs I
> mean 2-dimensional plots with lines and curves (to start with).

Of course you can draw lines in Cairo, this what Cairo was designed for.
But Cairo is a low-level vector graphic library. It does not have any
ready-to-use widgets and never will.

So if you want something out-of-shelf you have to look for higher level
libraries. Specifically, off-line plotting is done by Gtk.Extra.Plot.
Waveforms (on-line RT curves), i.e. an oscilloscope, is another story.

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



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

* Re: Cairo graphics library
  2011-08-05  7:17 ` Dmitry A. Kazakov
@ 2011-08-11  4:51   ` Ada novice
  0 siblings, 0 replies; 7+ messages in thread
From: Ada novice @ 2011-08-11  4:51 UTC (permalink / raw)


On Aug 5, 8:17 am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
> So if you want something out-of-shelf you have to look for higher level
> libraries. Specifically, off-line plotting is done by Gtk.Extra.Plot.
> Waveforms (on-line RT curves), i.e. an oscilloscope, is another story.

Thanks for this information. I will stick to other drawing software
for now.

Cheers
YC



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

* Re: Cairo graphics library
  2011-08-05  5:53 Cairo graphics library Ada novice
  2011-08-05  7:17 ` Dmitry A. Kazakov
@ 2011-08-11 23:27 ` Jerry
  2011-08-12  4:42   ` Ada novice
  1 sibling, 1 reply; 7+ messages in thread
From: Jerry @ 2011-08-11 23:27 UTC (permalink / raw)


On Aug 4, 10:53 pm, Ada novice <yogeshwars...@gmx.com> wrote:
> I've read that GNAT 2011 has an interface to the Cairo graphics
> library. Can we use this library to plot graphs with Ada? By graphs I
> mean 2-dimensional plots with lines and curves (to start with).
>
> Thanks.
>
> YC

Sorry for the late post.

Check out PLplot which has Ada bindings and a number of output
options.
http://plplot.sourceforge.net/
Note that the Ada bindings have Ada-specific additions that make
PLplot super-easy to use for many common situations. See the Ada
section of the documentation:
http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.8/ada.html

On the Examples page, the two bindings are called Ada(thick) and
Ada(thin)--both are thick bindings but Ada(thick) gets rid of the
ridiculous names.

Jerry



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

* Re: Cairo graphics library
  2011-08-11 23:27 ` Jerry
@ 2011-08-12  4:42   ` Ada novice
  2011-08-12 23:26     ` Jerry
  0 siblings, 1 reply; 7+ messages in thread
From: Ada novice @ 2011-08-12  4:42 UTC (permalink / raw)


On Aug 12, 12:27 am, Jerry <lancebo...@qwest.net> wrote:
> Check out PLplot which has Ada bindings and a number of output
> options.http://plplot.sourceforge.net/
> Note that the Ada bindings have Ada-specific additions that make
> PLplot super-easy to use for many common situations. See the Ada
> section of the documentation:http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.8/ada.html

Thanks but I have never been successful in making PLplot to work on
Windows. The installation is too complicated for Windows. Question(s)
that I asked on the PLplot forum did not get proper response. Perhaps
in some future, the author will make the PLplot installation without
any hassle like any other program should be.

I will follow the evolution of PLplot though as it is powerful and its
manual seems very comprehensive.


Cheers
YC



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

* Re: Cairo graphics library
  2011-08-12  4:42   ` Ada novice
@ 2011-08-12 23:26     ` Jerry
  2011-08-15  5:02       ` Ada novice
  0 siblings, 1 reply; 7+ messages in thread
From: Jerry @ 2011-08-12 23:26 UTC (permalink / raw)


On Aug 11, 9:42 pm, Ada novice <yogeshwars...@gmx.com> wrote:
> On Aug 12, 12:27 am, Jerry <lancebo...@qwest.net> wrote:
>
> > Check out PLplot which has Ada bindings and a number of output
> > options.http://plplot.sourceforge.net/
> > Note that the Ada bindings have Ada-specific additions that make
> > PLplot super-easy to use for many common situations. See the Ada
> > section of the documentation:http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.8/ada.html
>
> Thanks but I have never been successful in making PLplot to work on
> Windows. The installation is too complicated for Windows. Question(s)
> that I asked on the PLplot forum did not get proper response. Perhaps
> in some future, the author will make the PLplot installation without
> any hassle like any other program should be.
>
> I will follow the evolution of PLplot though as it is powerful and its
> manual seems very comprehensive.
>
> Cheers
> YC

Agreed. Seems like I (we?) have had this conversation before. PLplot
is, from this Mac user's perspective, a nightmare to install. (And I'm
one of the developers!) I think this is probably a main reason that
limits PLplot. I suspect that the PLplot official answer is that it
has to be this way because it is supported on a vast array of
different systems and thus requires cmake and compiling from source in
all cases. Although I'm on the development team, my only function is
working with the Ada bindings--I don't understand most of what the
others do. Like you, I think that, at least on the major supported
systems, I should be able to download a single thing and run an
installer and be done, even if the installer has to download more
stuff.

Jerry



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

* Re: Cairo graphics library
  2011-08-12 23:26     ` Jerry
@ 2011-08-15  5:02       ` Ada novice
  0 siblings, 0 replies; 7+ messages in thread
From: Ada novice @ 2011-08-15  5:02 UTC (permalink / raw)


On Aug 13, 12:26 am, Jerry <lancebo...@qwest.net> wrote:

> Agreed. Seems like I (we?) have had this conversation before.

Yes indeed. And yes you are right in saying that the installation can
be easier. And as you say, it doesn't matter if the installation has
to download other things. As long as different components can
communicate with each other during the installation process even if a
few adjustments are needed here and there, you will have a winning
package for everybody to use.

Well I have been a long user of Matlab and I used it for both the
coding and plotting of the results (most often simple 2D plots with a
set of points for each of the x and y axes). I've shifted to Ada since
last year and I see myself having to return to Matlab to do the
plotting in order to view the results. In any case, I always use
Matlab to produce figures (together with a LaTeX script) in my
documents. But it would be helpful, if I can do some (intermediate)
plotting within my Ada code itself and not having each time to use
Matlab to do the plotting.

I can only hope that as more and more Windows users would consider to
use PLplot with Ada, you will get more feedback and perhaps this will
lead to producing better installation procedures.


Keep it up!

Cheers
YC



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

end of thread, other threads:[~2011-08-15  5:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-05  5:53 Cairo graphics library Ada novice
2011-08-05  7:17 ` Dmitry A. Kazakov
2011-08-11  4:51   ` Ada novice
2011-08-11 23:27 ` Jerry
2011-08-12  4:42   ` Ada novice
2011-08-12 23:26     ` Jerry
2011-08-15  5:02       ` Ada novice

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