gnuplot

GNUPLOT: Plotting on the surface of a sphere

久未见 提交于 2019-12-18 02:57:10
问题 I have a function dependent on phi and theta, which I want to plot on the surface of a sphere. The date is stored in a .txt file with the columns: 1: x = R*sin(theta)*cos(phi) 2: y = R*sin(theta)*sin(phi) 3: z = R*cos(theta) 4: density I use the following gnuplot code to plot: set terminal wxt size 800,800 set mapping cartesian set view equal xyz set xlabel 'x' set ylabel 'y' set zlabel 'z' splot "densityprofile_100.000.txt" u 1:2:3:4 with pm3d pause -1 Unfortunately Gnuplot doesn't seem to

Installing Gnuplot 5.0 on Ubuntu

我只是一个虾纸丫 提交于 2019-12-18 02:51:18
问题 I have been trying to install Gnuplot 5.0 from source on Ubuntu. I followed the procedure given in the blog: Installing gnuplot from source I used the following commands: tar xzf gnuplot-5.0.0.tar.gz mkdir build cd build ../gnuplot-5.0.0/configure --with-readline=gnu make Everything until the configure command works fine. However, I end up getting the following error when I run the make command: In file included from ../../gnuplot-5.0.0/src/qtterminal/QtGnuplotWindow.cpp:187:0: ./ui

Gnuplot: how to add y2 axis scale for different units

让人想犯罪 __ 提交于 2019-12-17 23:26:02
问题 I'm plotting data from a file. The data points are in metric units. I want to show a second scale on the right (y2) that's in standard units. The file represents rocket motor thrust over time. The data are in Newtons. I want to show newtons on the left (this happens by itself, naturally) and pounds force on the right. The conversion is a simple factor (multiply N by 0.2248 to obtain lbf). I can set y2tics and if I set y2range manually, they appear on the right. What I don't know how to do is

gnuplot configuration file

限于喜欢 提交于 2019-12-17 20:34:44
问题 Don't know if it's a question for stackoverflow or superuser, but the beta SU community is still too small for such specific questions, I guess. Feel free to redirect it if you see it fit. I am trying to setup gnuplot so that at startup I always have the comma as datafile separator, with the following command set datafile separator "," unfortunately, it looks like there's no concept of a ".gnuplotrc" in gnuplot (at least, I didn't find anything in the man page, and I don't have strace on this

Gnuplot, plotting a graph with text on y axis

三世轮回 提交于 2019-12-17 20:28:54
问题 I am trying to plot a list with values that looks like this: directory file_sizes dir1 200 dir1 150 dir2 200 dir3 40 Ideally the y axis would have the text (first column) and the numbers (second column) on the x axis. I think a dots plotting would be best as I have a lot of dirs (20-30) and millions of files. Any ideas? 回答1: Here is a rather dirty gnuplot script, which does the filtering of the directory names completely inside of gnuplot. I love dirty gnuplot tricks :) Unfortunately this

gnuplot: load datafile 1:1 into datablock

好久不见. 提交于 2019-12-17 20:27:43
问题 How can I read a datafile as-is (or 1:1) into a datablock? And how could I do this platform independently? My attempt so far: ### load datafile "as is" into datablock for different platforms FILE = 'Test.dat' if (GPVAL_SYSNAME[:7] eq "Windows") { # "Windows_NT-6.1" is shown on a Win7 system load "< echo $Data ^<^<EOD & type ".FILE } if (GPVAL_SYSNAME eq "Linux") { # that's shown on a Raspberry load '< echo "\$Data << EOD" & cat '.FILE } if (GPVAL_SYSNAME eq "Darwin") { # this was shown on a

gnuplot and bash process substitution

不羁的心 提交于 2019-12-17 20:23:58
问题 Does gnuplot allow bash process substitution? In gnuplot I can do: plot "<join tmp1 tmp2" u 2:3 But I can't get this to work: plot "<join tmp1 <(join tmp2 tmp3)" u 2:3 Should it work, or isn't bash process substitution supported in gnuplot? Here are 3 example input files: cat tmp1 A 1 B 2 C 3 cat tmp2 B 3 C D 6 cat tmp3 A 4 B 6 C 8 D 10 E 12 回答1: The command following the < is executed with popen() , which uses /bin/sh (see man popen ). So you must invoke bash explicitely in order to make use

smooth peaks in gnuplot

不问归期 提交于 2019-12-17 20:15:27
问题 I have datapoints f(x_i) at points x_i (function f not known, only numerically) with f(0) = 0. The data show a peaklike structure at small x, to be followed by a slow shoulder-falloff at larger x that sets in half-way down from the maximum. I want to plot smoothed lines through these data points. If I use bezier then indeed f(0)=0 is ok, but the peak is significantly (by about 25%), lowered. If I use acsplines then the peak looks somewhat better, but f(0) = 0 is not maintained. How can I

gnuplot contour line color: set style line and set linetype not working

故事扮演 提交于 2019-12-17 18:27:28
问题 I am plotting data as described in a previous Stackoverflow question: gnuplot 2D polar plot with heatmap from 3D dataset - possible? Mostly it is working well for me, and I am down to some small details. One of these is how to exert control over the contour line colors and linewidths. There are lots of posts on the web regarding using set style increment user followed by definition of user style via set style line 1 lc rgb "blue" lw 2 etc. In theory this was supposed to force splot to plot

How do I draw a vertical line in gnuplot?

牧云@^-^@ 提交于 2019-12-17 18:25:59
问题 E.g. if I have a graph and want to add vertical lines at every 10 units along the X-axis. 回答1: Here is a snippet from my perl script to do this: print OUTPUT "set arrow from $x1,$y1 to $x1,$y2 nohead lc rgb \'red\'\n"; As you might guess from above, it's actually drawn as a "headless" arrow. 回答2: From the Gnuplot documentation . To draw a vertical line from the bottom to the top of the graph at x=3, use: set arrow from 3, graph 0 to 3, graph 1 nohead 回答3: alternatively you can also do this: p