src/examples/bubble.c (drawing)

131 views
Skip to first unread message

nader nekoubin

unread,
Nov 29, 2018, 11:16:46 AM11/29/18
to basilisk-fr
Hello all,

I run the code for the solution of rising bubble in a large tank (examples/bubble.c). It has worked appropriately, and I used the command
"set term PNG size 480,640" in gnuplot to draw the trajectory of bubble, it encounters with the following error:

gnuplot> set term PNG size 480,640
Terminal type set to 'unknown'
                  ^
         unknown or ambiguous terminal type; type just 'set terminal' for a list

I used the "set terminal" command in order to find the available options. I found that PNG is an available option because it is present in the list provided by this command. So, I could not understand the reason of this error. Please guide me in this regard.

Best regards,
Nader

Alexis Berny

unread,
Nov 29, 2018, 12:03:00 PM11/29/18
to basilisk-fr
Hi,
Gnuplot is case sensitive.
So you should type "set term png" and not "set term PNG"

Best
Message has been deleted

nader nekoubin

unread,
Nov 29, 2018, 1:12:33 PM11/29/18
to basilisk-fr
Hi Alexis,

I used the png instead of PNG, however it encountered with the following instructions:
gnuplot> set term png size 480,640
Terminal type set to 'png'
Options are 'nocrop enhanced size 480,640 font "/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf,12" '

I wrote the other commands as follows in order to see the results, however, the results are shown in the terminal as unrecognized characters.

set xlabel 'x'
set ylabel 'y'
set zlabel 'z'
set xyplane 0
splot [-0.7:0.7][-0.7:0.7]'bubble.19' u 3:5:4 w l t ''

I cannot find my mistake, I really appreciate your help.

Best regards,
Nader

Wojciech Aniszewski

unread,
Nov 30, 2018, 6:45:14 AM11/30/18
to nader nekoubin, basilisk-fr
Dear Nader,

First thing is, once you've set any terminal, such as in
set term png size 640,480
you additionally have to tell gnuplot where to output to. so the next command should
be
set output "filename.png"

The 'unrecognized' characters may even be the png outout you want,
but piped raw to STDOUT because you haven't specified the target file.

Second thing is, your drawing command probably is missing a space after square bracket.

Third thing: please remember, that most commands in gnuplot are very well documented when you type 'help'
followed by a keyword. For example, in gnuplot, type:

help png

or

help splot

it will tell you probably much more than want to know.

And finally:

I would kindly encourage some moderation on your side when posting to this list. You have
started 11 question threads here within last two weeks. Some more reading about fundamentals
of Linux command line, gcc, compilation and linking, gnuplot, MPI would be a good investment
of your time.

Regards
W.A.


signature.asc

nader nekoubin

unread,
Nov 30, 2018, 7:16:42 AM11/30/18
to basilisk-fr
Dear Wojciech,

Thank you very much for your explanation about gnuplot.
I understand that I ask so many questions and I appreciate your reply to my questions.
I will follow your instructions about asking in the group. Thank you for your guidance.

Best regards,
Nader
Reply all
Reply to author
Forward
0 new messages