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

How does PLplot compare against Gnuplot ?

967 views
Skip to first unread message

Vishnu

unread,
Aug 21, 2018, 10:09:20 AM8/21/18
to
I've used Gnuplot as my primary plotting tool when coding in Fortran by WRITEing gnuplot commands to a file and calling it using EXECUTE_COMMAND_LINE(). I do not really use much of its ability to perform statistics on the data.

Can people who've used both PLplot as well as Gnuplot comment on their relative ease of use, feature-full-ness, and image quality?

Arjen Markus

unread,
Aug 23, 2018, 7:36:19 AM8/23/18
to
On Tuesday, August 21, 2018 at 4:09:20 PM UTC+2, Vishnu wrote:
> I've used Gnuplot as my primary plotting tool when coding in Fortran by WRITEing gnuplot commands to a file and calling it using EXECUTE_COMMAND_LINE(). I do not really use much of its ability to perform statistics on the data.
>
> Can people who've used both PLplot as well as Gnuplot comment on their relative ease of use, feature-full-ness, and image quality?

Just a quick comment:
I have only sufficient experience with PLplot, but the two products have very different goals and use cases. PLplot is essentially a library for plotting (scientific) data, whereas Gnuplot is a standalone program. That means comparing the two is not the same as comparing apples and pears, but it comes close. Of course if you limit yourself to what features are available out-of-the--box, such a comparison becomes - perhaps - a bit easier.

Regards,

Arjen

Sergey Budaev

unread,
Aug 23, 2018, 12:33:50 PM8/23/18
to
Hi,

I have experience with PGPLOT (a more ancient origin of PLplot) and gnuplot and less with PLplot itself. They all are easy to use. In my view PGPLOT/PLplot are more flexible and produce nice plots because it is native Fortran code. It is also easy to save PostScript or PNG files from the Fortran program instead of displaying on the screen. Sometimes saving files is what is required.

gnulot, on the other hand, works by producing a text string script within Fortran code and then calling it with execute_command_line(). This limits functionality and makes it less integrated with the Fortran code. For gnuplot check out https://github.com/kookma/ogpf . However, the main advantage of gnuplot is that it is trivial to install on various platforms, including Windows.

PLplot, on the other hand is nontrivial to install on Windows (PGPLOT too, but check out https://spdg1.sci.shizuoka.ac.jp/grwin/en/). It is also difficult to build from sources because of many dependencies. So, if you or your collaborators use different platforms and have difficulties installing PLPLOT, it is easier to stick with gnuplot. If you use Linux, PLPLOT and PGPLOT can be available from the standard repository, making it trivial to install and use.

Best wishes,

Sergey
--
Sergey Budaev <sbu...@gmail.com>

Arjen Markus

unread,
Aug 24, 2018, 10:54:23 AM8/24/18
to
Sergey,

as one of the maintainers of PLplot (more specifically the Fortran binding) I am interested in your experiences with building and installing PLplot:
- I do not install it on a regular basis (I keep the libraries near where I need them ;)). Installation may indeed be less than trivial.
- Building should be simple though: the dependencies are checked and if they are not satisfied the low-level plot libraries or language bindings are excluded from the actual build.

Of course, you can make it much more complicated, but that is usually not necessary.

So what exactly are the difficulties you encountered?

Regards,

Arjen

Sergey Budaev

unread,
Aug 25, 2018, 6:02:48 AM8/25/18
to
Arjen,

I have been using PLplot from the repo on Linux, it is trivial (although might be not the latest version on Debian-based distros). I guess building from sources is also easy on Linux once you have cmake and other stuff. But the fact you need cmake and other dependencies makes it difficult to many Windows users. I agree that it is not difficult to advanced users though. But it is far from a turnkey library. Many Fortran users especially in sciences are not professional programmers, they do not even know anything about 'make', 'git' and the like. And still they use Fortran for computation.

Briefly, it would be great to provide binary builds of PLplot for Windows.

Best wishes, Sergey


--
Sergey Budaev <sbu...@gmail.com>

Clive Page

unread,
Aug 27, 2018, 5:08:34 AM8/27/18
to
On 25/08/2018 11:02, Sergey Budaev wrote:
> I have been using PLplot from the repo on Linux, it is trivial (although might be not the latest version on Debian-based distros). I guess building from sources is also easy on Linux once you have cmake and other stuff. But the fact you need cmake and other dependencies makes it difficult to many Windows users. I agree that it is not difficult to advanced users though. But it is far from a turnkey library. Many Fortran users especially in sciences are not professional programmers, they do not even know anything about 'make', 'git' and the like. And still they use Fortran for computation.
>
> Briefly, it would be great to provide binary builds of PLplot for Windows.

I would support that too. Some time ago I managed to build PLPLOT on Windows 10, but it required me to download something like seven other packages and install them first. And then I had to play about with changes to my PATH variables to get all the other libraries to load in the correct order. The whole effort took something like a day. I wondered about writing up my notes and posting them for others, but decided that the typical scientist/engineer who is also a Fortran programmer would look at them and decide that it is not worth the effort, and that because of the number of packages involved the detailed notes would probably become out-of-date too quickly.

As a PGPLOT user for many years on a variety of operating systems from VMS to SunOS to Solaris to Linux, I found it fairly easy to build and install, simply because it's all Fortran (unfortunately Fortran-77). The idea of PLPLOT, I gather, was to provide a modernised equivalent. For users of Unix-like operating systems this is fine, but for those who do much of their programming on Windows, the number of dependencies on other packages makes it a nightmare.



--
Clive Page

Arjen Markus

unread,
Aug 27, 2018, 5:31:12 AM8/27/18
to
Thank you for your comments, Sergey, Clive.

Being a maintainer I am simply too close to the package to be able to recognise such difficulties. It is definitely something to take into account!

An immediate solution that comes to mind is to provide the binaries for a more or less minimal set-up. Not sure what that would/should contain at this moment and there may be all manner of difficulties to solve (think about the compilers and compiler versions that should be supported and the number of environments - plain Windows, Cygwin, MinGW). I will give it some more thought though.

Regards,

Arjen

Gary Scott

unread,
Aug 27, 2018, 8:37:31 AM8/27/18
to
I for one find it appalling to have to install Cygwin/MinGW and such on
windows...Packages that have such prerequisites will never get me to use
them...go native or go home :)

Arjen Markus

unread,
Aug 27, 2018, 9:20:10 AM8/27/18
to
On Monday, August 27, 2018 at 2:37:31 PM UTC+2, Gary Scott wrote:

> I for one find it appalling to have to install Cygwin/MinGW and such on
> windows...Packages that have such prerequisites will never get me to use
> them...go native or go home :)

That is not at all necessary - you can build it (okay, that is required at the moment) using pure Windows tools alone, say using MS Visual Studio and Intel Fortran.

Regards,

Arjen

Sergey Budaev

unread,
Aug 27, 2018, 11:23:44 AM8/27/18
to
Thanks for all your comments. In my opinion few typical Fortraners will ever build all this requirements. Most will just slip into the easy path of saving data into a text/csv/binary and make all plotting elsewhere (perhaps R or MATLAB if they are used anyway for data analysis). This is a disaster if you collaborate; then the minimum suitable solution has to be used in the whole project.

And here is a general unfortunate effect. Unlike certain new generation languages where you can easily plug-in a library from the net and then easily produce nice plots with a couple of lines of code, Fortran requires downloading and building and ... build errors and more and more downloading and building. You need open source expertise and really huge motivation to do this on Windows (perhaps only the developers of PLplot have such a motivation:). Hence the overall reputation of Fortran: outdated language that is difficult to use... Because Fortran is nearly ideal for computational work and plotting is such a critical area here, improving plotting user experience is indispensable. Please make installing and using PLplot easy!

Best wishes,

Sergey
--
Sergey Budaev <sbu...@gmail.com>

David Kinniburgh

unread,
Aug 28, 2018, 5:16:00 AM8/28/18
to
I agree with Sergey and others. Some limited form of binary distribution would be very useful.

Arjen Markus

unread,
Aug 31, 2018, 3:18:36 AM8/31/18
to
On Tuesday, August 28, 2018 at 11:16:00 AM UTC+2, David Kinniburgh wrote:
> I agree with Sergey and others. Some limited form of binary distribution would be very useful.

I have been experimenting a bit with a mean and lean installation of PLplot. I hope to have something useful early next week.

Regards,

Arjen

Dominik Gronkiewicz

unread,
Aug 31, 2018, 8:41:36 AM8/31/18
to
I am planning to do some simple image manipulation software. My colleague told me that PGplot is capable of handling simple widgets (buttons, inputs etc). Is this also true for PLplot? My other option is to write GUI part in Python or in C (the GUI will be very simple and consist of a couple of sliders and image preview).

Arjen Markus

unread,
Aug 31, 2018, 9:49:21 AM8/31/18
to
On Friday, August 31, 2018 at 2:41:36 PM UTC+2, Dominik Gronkiewicz wrote:
> I am planning to do some simple image manipulation software. My colleague told me that PGplot is capable of handling simple widgets (buttons, inputs etc). Is this also true for PLplot? My other option is to write GUI part in Python or in C (the GUI will be very simple and consist of a couple of sliders and image preview).

No, I am afraid not - there is a possibility to use Qt for user-interface purposes and you can embed the PLplot window in a GUI window, but PLplot as such does not do much in that respect. (I would use Tcl/Tk for that, but that is also outside of PLplot ;)).

Regards,

Arjen

Alexey Cherkaev

unread,
Aug 31, 2018, 10:37:50 AM8/31/18
to
On that note, there is binary PlPlot for MinGW, but I couldn't make it work: it somehow doesn't see the drivers -- I couldn't trace the problem further.

My other problem with PlPlot was how to make multiple plot windows. And also, how to pause program execution until the plot window is closed as I wanted to show one graph and then the second, although, coming to think about it, showing two windows would've been easier.

Arjen Markus

unread,
Aug 31, 2018, 10:45:37 AM8/31/18
to
I am not sure that sort of things is in the public API, but several years ago I incorporated PLplot in a GUI that could open any number of windows with a variety of plots inside each window. I used the C API underneath for that.

Intriguing use case - could you post that perhaps on the PLplot mailing list? Perhaps someone has a ready solution.

Regards,

Arjen

Clive Page

unread,
Aug 31, 2018, 10:58:27 AM8/31/18
to
On 31/08/2018 13:41, Dominik Gronkiewicz wrote:
> I am planning to do some simple image manipulation software. My colleague told me that PGplot is capable of handling simple widgets (buttons, inputs etc). Is this also true for PLplot? My other option is to write GUI part in Python or in C (the GUI will be very simple and consist of a couple of sliders and image preview).

Another library you might consider is DISLIN - has some basic GUI controls and easy to link with Fortran90 on Unix-like systems and on Windows. Commercial package but fee for non-commercial use.


--
Clive Page

baf

unread,
Aug 31, 2018, 12:14:42 PM8/31/18
to
note typo Should be

Commercial package, but FREE for non-commercial use.

Clive Page

unread,
Aug 31, 2018, 4:42:56 PM8/31/18
to
On 31/08/2018 17:15, baf wrote:
> note typo  Should be
>
> Commercial package, but FREE for non-commercial use.
>

Oh dear. Thanks for the correction - what a difference a letter makes!


--
Clive Page

Arjen Markus

unread,
Sep 5, 2018, 3:34:37 AM9/5/18
to
As promised: you can now download an installation executable from Github at https://github.com/arjenmarkus/plplot-windows-bin/blob/master/install.exe

And a short, hopefully useful, description at https://github.com/arjenmarkus/plplot-windows-bin

Note: I built it for Intel Fortran 2015/2017 and Windows. The list of devices is fairly short, as under (plain) Windows gathering all manner of libraries for other devices is a trifle tedious, but it should give you a nice starting point.

Regards,

Arjen

Sergey Budaev

unread,
Sep 5, 2018, 6:23:00 AM9/5/18
to
Arjen,

Thanks a lot! I will try it today.

Best wishes,

Sergey
--
Sergey Budaev <sbu...@gmail.com>

Arjen Markus

unread,
Sep 5, 2018, 6:47:09 AM9/5/18
to
You're welcome - let me know if anything is missing. I did not include the runtime libraries for the C and Fortran compilers, as I guess these are already available. But you never know ;).

Regards,

Arjen

Rudi Gaelzer

unread,
Sep 5, 2018, 12:18:00 PM9/5/18
to
I'm particularly interested in this comparison for didactic purposes, particularly with respect to parametric animations (i.e., particle position X time) that can be used to show the numerical solutions of equations of motion in real time.

In the ogpf page (https://github.com/kookma/ogpf) I can easily find some examples of animations that employ gnuplot, but I wasn't equally successful on finding similar examples with plplot.

Do you know if there is a simple template to generate an animation with plplot? I mean in real time, during the program run, as in contrast to saving a bunch of png figures with snapshots and then using a third-party app to create the video...

Arjen Markus

unread,
Sep 6, 2018, 3:17:59 AM9/6/18
to
On Wednesday, September 5, 2018 at 6:18:00 PM UTC+2, Rudi Gaelzer wrote:
> I'm particularly interested in this comparison for didactic purposes, particularly with respect to parametric animations (i.e., particle position X time) that can be used to show the numerical solutions of equations of motion in real time.
>
> In the ogpf page (https://github.com/kookma/ogpf) I can easily find some examples of animations that employ gnuplot, but I wasn't equally successful on finding similar examples with plplot.
>
> Do you know if there is a simple template to generate an animation with plplot? I mean in real time, during the program run, as in contrast to saving a bunch of png figures with snapshots and then using a third-party app to create the video...
>

A few possibilities come to mind - one of them being the concept of "pages" in PLplot - you can easily define multiple plots and scroll in one way through them. What I see at the ogpf webpage is a single plot being built up. That should not be too hard. I will try and concoct a simple example.

Regards,

Arjen

Arjen Markus

unread,
Sep 7, 2018, 2:51:27 AM9/7/18
to
On Wednesday, September 5, 2018 at 6:18:00 PM UTC+2, Rudi Gaelzer wrote:
> I'm particularly interested in this comparison for didactic purposes, particularly with respect to parametric animations (i.e., particle position X time) that can be used to show the numerical solutions of equations of motion in real time.
>
> In the ogpf page (https://github.com/kookma/ogpf) I can easily find some examples of animations that employ gnuplot, but I wasn't equally successful on finding similar examples with plplot.
>
> Do you know if there is a simple template to generate an animation with plplot? I mean in real time, during the program run, as in contrast to saving a bunch of png figures with snapshots and then using a third-party app to create the video...
>

I have added three examples of animation via PLplot in the Github-project I created - see https://github.com/arjenmarkus/plplot-windows-bin, directory "examples-animation".

Is this the sort of things you are looking for? (Mind you, I took the simplest of the standard examples and added a loop to produce slightly different xy-plots. The same principle should hold for more complicated plots, but you may get "holes" in the animation if plotting an individual picture takes too long)

Regards,

Arjen

0 new messages