gnuplot

change hour format gnuplot (substract 12 hour)

空扰寡人 提交于 2019-12-23 22:33:12
问题 I have two devices working in paralell, the problem is that one of them was set up 12 hours different than the other (that is, instead of 17:00, marked 05:00). I'm trying to apply this solution: How to read 12h (AM/PM) timeformat in gnuplot In this way: My data are like this: #Time Concentration (#/cm³) 05:00:14 5902 05:00:15 5898 05:00:16 5989 05:00:17 5921 And I'm running the folowing code: set xdata time set timefmt '%H:%M:%S' set format x '%H:%M' set xlabel "time" plot "< awk '{time = $1;

Space between Y axis and bar on gnuplot histogram

丶灬走出姿态 提交于 2019-12-23 18:43:00
问题 I have gnuplot script like this: set term pos eps set style data histogram set style histogram clustered gap 1 set grid y set boxwidth 0.8 absolute set style fill transparent solid 0.8 noborder #set key outside right top vertical Left #component stuff set output 'eps/component.eps' set title "Component in interesting Issues" set xlabel "Components" set xtics nomirror rotate by -270 plot 'dat/!component' using 2:xtic(1) t "Count" lc rgbcolor "blue" lt 1 and data: Cmp count AM 167 NM 90 RM 83

Gnuplot, how to include a space character in key titles?

大兔子大兔子 提交于 2019-12-23 18:07:19
问题 I want to use key titles like "Best F" "Worst F" for a gnuplot 4.4 graph, when reading the data from a file, but I can't figure out how to put the space, e.g.: Generation Best_F Worst_F Average_F 5 4 9 5 4 3 9 4 I tried writing in the file "Best F", "Best%20F" "Best\ F" but they get split, when read as column headers, or I get the ugly looking "%20". plot for[col=2:4] data.dat using 1:col title columnheader(col) Or is there a way to do a character substitution, like "Best_F"%" "->"Best F"?

Using images for points in gnuplot

て烟熏妆下的殇ゞ 提交于 2019-12-23 18:01:26
问题 I have a frivolous question. Is there any way to use an image in lieu of points in gnuplot? For example, if I was plotting data about pasta consumption or something, I would have pictures of pasta (instead of usual gnuplot points). 回答1: Another option is to find a dingbats type of font with a suitable glyph. Then you can use "plot with labels" using that glyph as the label string. See for example the 5th plot in the demo http://gnuplot.sourceforge.net/demo/stringvar.html 回答2: I haven't played

Plotting date/time data points and functions in the same graph

ⅰ亾dé卋堺 提交于 2019-12-23 17:24:05
问题 I want to plot a set of date/time data points with the x value specified by unix epoch, seconds since 1970. I also want to plot a trend function along with the data (yes I know gnuplot can do this for me, but this is an example). So I have data.txt that looks like this: 1303430400 67.5 1303862400 65.5 1304208000 62.9 1304553600 60.2 And I have a gnuplot program that looks like this: set terminal png set output 'plot.png' set timefmt "%s" set xdata time plot "data.txt" using 1:2 title "Data

Customize color ranges in Gnuplot

青春壹個敷衍的年華 提交于 2019-12-23 15:53:01
问题 I have a contour plot running just fine and it is generating an equal amount of color for different values. What I want is to generate the label on the right side to have a right color for each block. current result: What I want is to have this value on each block: ---- 300 ---- 100 ---- 70 ---- 30 ---- 10 ---- 1 ---- 0 Edit: When I add this code: set cbtics ('300' 300, '100' 100, '30' 30, '10' 10, '1' 1, '0.5' 0.5, '0.1' 0.1, '0.01' 0.01, '0' 0); set palette defined (0.1 "#4CAF4F",0.3 "

Different number of samples for different functions

浪尽此生 提交于 2019-12-23 15:27:40
问题 plot x+3 , x**2+5*x+12 Is it possible to set x+3 to have only 2 samples and x**2+5*x+12 to have say 1000 samples in the same plot? 回答1: It can be done, but not out-of-the-box. The first variant uses a temporary file to save one function with a low sampling rate and plotting it later together with the high-resolution function: set samples 2 set table 'tmp.dat' plot x+3 unset table set samples 1000 plot 'tmp.dat' w lp t 'x+3', x**2 + 5*x + 12 This has the advantage, that you can use any

how to draw objects (rect) from a file

橙三吉。 提交于 2019-12-23 14:53:43
问题 In gnuplot i can draw a rectangle via set object rect from x0,y0 to x1,y1 How to read the coordinates x0,x1,y0,y1 from a file? 回答1: One way would be to put the line of code that sets the rectangle into a separate file and call that file from within the gnuplot script. So you have a file called "coord.txt" that contains the one line set object rect from 2,2 to 4,40 and you have a gnuplot script called "rect.gp" that says set title "call rectangle coordinates" load "coord.txt" plot x**2 If you

how to draw objects (rect) from a file

喜你入骨 提交于 2019-12-23 14:52:15
问题 In gnuplot i can draw a rectangle via set object rect from x0,y0 to x1,y1 How to read the coordinates x0,x1,y0,y1 from a file? 回答1: One way would be to put the line of code that sets the rectangle into a separate file and call that file from within the gnuplot script. So you have a file called "coord.txt" that contains the one line set object rect from 2,2 to 4,40 and you have a gnuplot script called "rect.gp" that says set title "call rectangle coordinates" load "coord.txt" plot x**2 If you

Passing data from C++ to gnuplot example (using Gnuplot-iostream interface)

旧街凉风 提交于 2019-12-23 13:24:30
问题 I have just come accross Dan Stahlke's gnuplot C++ I/O interface, which saves me from "rolling my own". Unfortunately, there are not too may examples and there ios no real documentation. I have the following data types in my C++ project: struct Data { std::string datestr; // x axis value float f1; // y axis series 1 float f2; // y axis series 2 float f3; // y axis series 3 }; typedef std::vector<Data> Dataset; I want to pass a Dataset variable from C++, so that I can plot the data (dates on