gnuplot

gnuplot arbitrary labeling x - axis

南楼画角 提交于 2019-12-23 12:30:09
问题 I have the following data file for gnuplot 1 0.5 0.9 2 -0.1 0.5 3 0.7 0.4 where the first column is x-axis, and 2,3 columns are two different graphs. Coordinates of x-axis are always natural numbers, they represent the location of the word in sentence, 2 and 3 columns is just the result of function on the word in sentence. I wonder if it's possible to label "1", "2" ,... on the x-axis with words from sentence. If I would have 1 A 0.5 0.9 2 green -0.1 0.5 3 apple 0.7 0.4 ans then in stead of 1

Gnuplot: how to fill a bar with both a color background and a pattern

本小妞迷上赌 提交于 2019-12-23 11:52:11
问题 I want to fill a bar with both a color background and a pattern. Is it possible in Gnuplot? I am using Gnuplot 4.6.5 The code I have now: # set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 500, 350 # set output 'histograms.2.png' set boxwidth 0.9 absolute set style fill solid 1.00 border lt -1 set key inside right top vertical Right noreverse noenhanced autotitles nobox set style histogram clustered gap 1 title offset character 0, 0, 0 set datafile missing '-' set

Gnuplot exit on window close

北城余情 提交于 2019-12-23 10:09:56
问题 I use the following script to print readings from a .csv file. The plot is refreshed every second to show new data when a simulation is running. This works kinda nice, although is a little ugly since the whole dataset is reread (if you have a better solution please let me know) However, when I close the gnuplot window the script does not exit, but after 1 second pause a new window spawns, which is kinda annoying. I'd rather have my script closed once i close the window. Is there a way to

gnuplot - smooth interpolation x=f(y)

廉价感情. 提交于 2019-12-23 10:08:39
问题 I would like to plot a 2D graph with csplines interpolation of my data with an independent variable on y axis. The interpolating function should be in x = f(y) form. Is there any way to do this without switching axes? gnuplot: set terminal svg size 400,300 enhanced fname 'arial' fsize 10 butt solid set output 'out.svg' set xrange [10:13] plot "data.txt" using 2:1 notitle #smooth csplines Data: 1 11.45294118 2 11.43529412 3 11.18823529 4 10.98235294 5 10.94117647 6 11.28823529 7 11.27058824

gnuplot - plot different blocks with different color

大城市里の小女人 提交于 2019-12-23 09:55:34
问题 I have a data like this in a file.dat 2 2 5 5 7 3 100 102 130 80 116 134 -40 -100 -50 -60 -61 -58 I would want to plot each block in different color, There is no restriction that a specific color, but just some visually different color. I tried with linetype like this: for [IDX=0:2] 'file.dat' i IDX u 1:2 with linespoints linetype IDX it plots all the blocks with different color and obviously only last one is visible. So what is the right way to do this? 回答1: That is the right way, but you

Gnuplot: how to plot date / time chart

孤街醉人 提交于 2019-12-23 08:36:54
问题 I would like to plot this kind of data: X axis: dates Y axis: time lenght The data would looks like that: 22/02 51:10 25/02 63:10 01/03 50:55 23/03 52:10 I already done that for the X axis: set xdata time set timefmt "%d/%m" But I don't know how to manage Y axis. 回答1: As Tom said, you can only use one timefmt. However, if it is possible to split your data to more columns like this: 22/02 51 10 25/02 63 10 01/03 50 55 23/03 52 10 you can then plot the time length by direct calculation, like

Gnuplot: how to plot date / time chart

萝らか妹 提交于 2019-12-23 08:36:15
问题 I would like to plot this kind of data: X axis: dates Y axis: time lenght The data would looks like that: 22/02 51:10 25/02 63:10 01/03 50:55 23/03 52:10 I already done that for the X axis: set xdata time set timefmt "%d/%m" But I don't know how to manage Y axis. 回答1: As Tom said, you can only use one timefmt. However, if it is possible to split your data to more columns like this: 22/02 51 10 25/02 63 10 01/03 50 55 23/03 52 10 you can then plot the time length by direct calculation, like

Gnuplot - data points in script

牧云@^-^@ 提交于 2019-12-23 08:09:22
问题 I have C++ program that now generates two files: data file (with columns of data) gnuplot script (to set ranges and labels properly) So, for plot I need to have two files which are related to each other. Is there any possibility, to pack it all to one file? I mean: to put data points coordinates inside gnuplot script? I am using gnuplot 4.4. 回答1: Yes, you can put datapoints inside your gnuplot script. The simplest example would be plot "-" with lines, "-" with lines 1 1 2 2 3 3 e 1 3 2 2 3 1

Gnuplot - data points in script

与世无争的帅哥 提交于 2019-12-23 08:08:43
问题 I have C++ program that now generates two files: data file (with columns of data) gnuplot script (to set ranges and labels properly) So, for plot I need to have two files which are related to each other. Is there any possibility, to pack it all to one file? I mean: to put data points coordinates inside gnuplot script? I am using gnuplot 4.4. 回答1: Yes, you can put datapoints inside your gnuplot script. The simplest example would be plot "-" with lines, "-" with lines 1 1 2 2 3 3 e 1 3 2 2 3 1

gnuplot - Colored tic marks

血红的双手。 提交于 2019-12-23 07:26:45
问题 Is there any way to have gnuplot color the tic marks in the x and/or y axis? I'm using a background png file which is quite dark and I'd like the inner tics to show in white over it, not the default black. 回答1: The tics seem to inherit their color from the border : set style line 50 lt 1 lc rgb "red" lw 2 set border ls 50 plot sin(x) The tic labels get their color from the textcolor option of tics : set tics textcolor rgb "red" (The string "white" should work too, but that wouldn't look very