gnuplot

star symbols in gnuplot

不想你离开。 提交于 2019-12-21 20:53:48
问题 I'm trying to generate an .eps figure in gnuplot using set terminal postscript eps enhanced color solid I want to include in my figure a title for a plot containing some star symbols, e.g ★ ☆ I tried through this: plot "./mydata" u 1:2 title "★ ☆" as well as this: stars = sprintf("★ ☆") plot "./mydata" u 1:2 title stars but both of them don't work. Any ideas? 回答1: set term postscript enh color eps set output 'test.eps' set title 'star1:{/ZapfDingbats \110} star2:{/ZapfDingbats \111}' plot sin

Gnuplot: linespoint with confidence interval

萝らか妹 提交于 2019-12-21 19:25:56
问题 I've following data: I want to plot a graph shows for all x the mean connected with lines (linespoint) and also showing all the confidence interval [ci_lower, ci_upper]. I managed to do that using 2 plots. set xrange [0:1100000] set yrange [0:5000] plot \ '2011-06-16_1n_result.txt' using 1:7 title '1 node' with lines, \ '2011-06-16_1n_result.txt' using 1:7:10:11 notitle with errorbars However it doesn't look nice with two colors and I have the feeling that there should be a way to do that

How to output a file in gnuplot multiplot mode?

☆樱花仙子☆ 提交于 2019-12-21 09:27:08
问题 I am plotting graphs in gnuplot (version 4.6 patchlevel 5) multiplot mode, which are being updated using reread. set multiplot layout 3, 3 do for [planeIter=4:10:3] for [ringIter=0:20:10] { plot for [quadIter=0:90:30] path/to/file \ using 1:(column(1 + planeIter + ringIter + quadIter)) notitle } pause 10 reread Previously, I have outputted png files using: set terminal pngcairo dashed enhanced plot path/to/file using 1:2 set output 'foo.png' But I haven't been able to find how to output a

Using sprintf to print string value

时间秒杀一切 提交于 2019-12-21 04:57:07
问题 Actually, I get this problem in Gnuplot. But in a simple way, the problem is I want to use sprintf to print in string format, even though the string consists of numbers and symbol. Like this: a = '12/7' sprintf('%.f', a) I am able to run it in Gnuplot, but it only shows numbers before symbol "/". I expect the output should print all the content of variable a which is '12/7'. Any suggestion for this case? 回答1: If you are referring to the sprintf built-in function in gnuplot , the documentation

gnuplot: 2D plot of a matrix of data

牧云@^-^@ 提交于 2019-12-21 04:14:39
问题 How can I plot (a 2D plot) a matrix in Gnuplot having such data structure, using the first row and column as a x and y ticks (the first number of the first row is the number of columns) and represent the rest of the values by a colour mapping so it can be seen on a 2D plane ? 4 0.5 0.6 0.7 0.8 1 -6.20 -6.35 -6.59 -6.02 2 -6.39 -6.52 -6.31 -6.00 3 -6.36 -6.48 -6.15 -5.90 4 -5.79 -5.91 -5.87 -5.46 回答1: You can plot this data format using matrix nonuniform . To get a heatmap you can plot either

How do I convert an integer to a string in gnuplot?

浪尽此生 提交于 2019-12-21 03:48:05
问题 I know how to use $ with using in examples like plot datafile using f($1):g($2) to plot functions of column data. But I want to use this feature in a loop: plot for [c=1:10] datafile using f($(c)):g($(c+1)) Of course this code doesn't work. I guess that if I know how to convert the integer c to a string (or a single ASCII character) then it would work. How can I do it? (If the same task can be done without conversion of integer to string, that would be fine too.) 回答1: Are you looking for

How to write to stdout with gnuplot's print statement?

喜夏-厌秋 提交于 2019-12-21 03:47:21
问题 When I use the following in my script, gnuplot will print test to stderr : print "test" However, I want to write test to stdout as only errors should be written to stderr . 回答1: As stated in the gnuplot docs (type help print in interactive gnuplot console): The output file can be set with set print. So, let's look up set print : Without "<filename>" , the output file is restored to <STDERR> . The <filename> "-" means <STDOUT> . So simply add a set print "-" at the top of your gnuplot script

Gnuplot behaves oddly in polynomial fit. Why is that?

ε祈祈猫儿з 提交于 2019-12-20 19:55:39
问题 A friend of mine discovered some odd behavior in gnuplot regarding a simple polynomial fit Can sombody explain this? Here is the file: #!/usr/bin/gnuplot -p f(x) = B*(x**4) + A fit f(x) "data.txt" using ($1+273.14):2 via A, B plot "data.txt" using ($1+273.14):2 notitle,\ f(x) notitle The data is: # content of data.txt 350 3.856 330 3.242 290 2.391 250 1.713 210 1.181 170 0.763 130 0.437 The resulting plot is the green line. The blue line shows a far better fit using another function of

gnuplot: subtitle with smaller fontsize

旧街凉风 提交于 2019-12-20 19:36:16
问题 Does somebody know how you can insert a subtitle with a smaller fontsize in gnuplot? Currently, the way I create a subtitle is by using \n in the title. Additionally, I would like the subtitle to have a smaller fontsize. Thanks in advance. 回答1: This works for the postscript terminal at least (for some reason x11 didn't want to scale my font. Perhaps it is a bug...): set term <whatever> enhanced set output "<whatever.ext>" set title "Big Title\n{/*0.5 subtitle}" The {/*0.5} scales the fontsize

gnuplot: subtitle with smaller fontsize

放肆的年华 提交于 2019-12-20 19:34:50
问题 Does somebody know how you can insert a subtitle with a smaller fontsize in gnuplot? Currently, the way I create a subtitle is by using \n in the title. Additionally, I would like the subtitle to have a smaller fontsize. Thanks in advance. 回答1: This works for the postscript terminal at least (for some reason x11 didn't want to scale my font. Perhaps it is a bug...): set term <whatever> enhanced set output "<whatever.ext>" set title "Big Title\n{/*0.5 subtitle}" The {/*0.5} scales the fontsize