sandbox & gnuplot

236 views
Skip to first unread message

jose.lopez...@gmail.com

unread,
Apr 19, 2017, 12:28:55 PM4/19/17
to basilisk-fr
Hi all,

I have prepared with M.A. Herrada a simulation of his recent work with Jens Eggers (and colleagues) to be published in JFM. It is in my sandbox ( http://basilisk.fr/sandbox/lopez/unsymshock.c ). However I have not been able to plot the graphics with gnuplot.

I do not know if what I describe below is related to this but
when I run it in my own repository (make unsymshock.tst) it creates a 'plots' file in the corresponding directory that is automatically deleted when the simulation finish.

Shall I have to modify the Makefile or to add some 'set terminal... ' stuff to the gnuplot part ?

/**
~~~gnuplot
set terminal ....
.....
*/

Cheers and thank in a advance !

Jose

Stephane Popinet

unread,
Apr 19, 2017, 1:28:03 PM4/19/17
to basil...@googlegroups.com
Hi Jose,

When I do:

make unsymshock.tst
make unsymshock/plots

I get:

cd unsymshock && awk -f /home/popinet/basilisk/src/gnuplot.awk <
../unsymshock.c > plots && \
PNG=pngcairo sh /home/popinet/basilisk/src/gnuplot.sh || rm -f plots
unsymshock.c:113: warning: gnuplot: invalid command

and indeed at line 113 your caption is on multiple lines, which is not
allowed. If I fix this, I then get:

make unsymshock/plots
...
unsymshock.c:136: warning: gnuplot: *All* edges undefined or out of
range, thus no plot.

so you need to fix your gnuplot script.

cheers

Stephane

Jose M. López-Herrera Sánchez

unread,
Apr 19, 2017, 4:00:47 PM4/19/17
to basil...@googlegroups.com

---------- Forwarded message ----------
From: Jose M. López-Herrera Sánchez <jose.lopez...@gmail.com>
Date: 2017-04-19 20:46 GMT+02:00
Subject: Re: sandbox & gnuplot
To: Stephane Popinet <pop...@basilisk.fr>


Hi Stephane,

and indeed at line 113 your caption is on multiple lines, which is not allowed.

Ok, I will simplify the caption.


unsymshock.c:136: warning: gnuplot: *All* edges undefined or out of range, thus no plot.

so you need to fix your gnuplot script.

Weird! I create first a gnuplot script ['density.plt' in this case (I attach)]  that I inspect by doing,

% gnuplot
> load 'density.plt'

I keep tuning the .plt file until  I am happy with the graph. Only then, I cut & paste the .plt script into the c file.

It must be some type of incompatibility between the terminal you set in gnuplot.sh  and the terminal that by defect use my gnuplot.  I will investigate a little bit.


Cheers



density.plt

jose.lopez...@gmail.com

unread,
Apr 20, 2017, 6:40:03 AM4/20/17
to basilisk-fr, pop...@basilisk.fr
Hi Stephane,

I am trying to fix the problem of graph. To do this I have proceed little by little in my sandbox with the following procedure.

1. I have removed all the '  ~~~gnuplot'  from the c file.
2. I have done %make unsymshock.tst (fime)!
3. Little by little I have been adding the gnuplot stuff.
   3.a First a graph
   3.b running make unsymshock/plots and inspecting _plot0.png files

Doing this I have generated _plot0.png  and  _plot1.png  I attach

However when I move this changes to c file in the wiki. I reproduce the error

*All* edges undefined or out of range ....

I wonder If this is due to the different versions of gnuplot  (mine Version 4.6 patchlevel 4).

Could you please check your version and see if you now generates _plot0.png and _plot1.png ?

Cheers (and sorry by bothering you with this stuff).

Jose
_plot0.png
_plot1.png

Stephane Popinet

unread,
Apr 21, 2017, 2:29:54 AM4/21/17
to basilisk-fr
> I wonder If this is due to the different versions of gnuplot (mine
> Version 4.6 patchlevel 4).

The version of gnuplot on the server is 4.4, so I suspect the problem is
due to a difference in versions. Check if any of the features you are
using for your fancy graphs have been introduced between 4.4 and 4.6.

cheers

Stephane
Reply all
Reply to author
Forward
0 new messages