gnuplot

gnuplot, break y-axis in two parts

无人久伴 提交于 2019-12-17 18:25:14
问题 I have a histogram with some small values and some very big values. How can I break the y-axis in two parts? EDIT: gnuplot sample: set style histogram columnstacked set style data histograms set key autotitle columnheader plot for [i=2:6] 'test.dat' using i test.dat: action device1 device2 device3 load 200 203 190 2 4 process 3 9 6 7 3 save 4 2 7 4 3 回答1: My answer is based on the example and comment on this website. In essence, you are looking for a broken y-axis , which can be achieved

gnuplot plot data from two files: in one x coordinate, in other y

你说的曾经没有我的故事 提交于 2019-12-17 18:19:04
问题 I have two files: one with x coordinates, and other with y. Is there a way to plot this two files in one graph using gnuplot? Or is there a way to concat row by row this two files? Thanks 回答1: There is not a way to plot the x coordinate from one file and the y coordinate from another natively in gnuplot. If you use a bash-like shell, you can use the command paste x_data.dat y_data.dat > xy_data.dat to combine files row-by row. If you want to put this command into a gnuplot script, you can do

Fitting a curve to specific data

纵饮孤独 提交于 2019-12-17 17:54:08
问题 I have the following data in my thesis: 28 45 91 14 102 11 393 5 4492 1.77 I need to fit a curve into this. If I plot it, then this is what I get. I think some kind of exponential curve should fit this data. I am using GNUplot. Can someone tell me what kind of curve will fit this and what initial parameters I can use? 回答1: Just in case R is an option, here's a sketch of two methods you might use. First method: evaluate the goodness of fit of a set of candidate models This is probably the best

How to plot several datasets with titles from one file in Gnuplot?

一个人想着一个人 提交于 2019-12-17 15:32:47
问题 Assuming I have a file that looks like this: "p = 0.1" 1 1 3 3 4 1 "p = 0.2" 1 3 2 2 5 2 Is it possible to make Gnuplot plot these two datasets in one plot with the titles given on the first line of each dataset? 回答1: It's definitely possible and your datafile is already the correct format. The functionality you're looking for is built into columnheader(N) which reads the data at the top of the N'th column and uses it as the plot title: plot 'test.dat' i 0 u 1:2 w lines title columnheader(1),

Calling gnuplot from python

蹲街弑〆低调 提交于 2019-12-17 15:29:07
问题 I've a python script that after some computing will generate two data files formatted as gnuplot input. How do I 'call' gnuplot from python ? I want to send the following python string as input to gnuplot: "plot '%s' with lines, '%s' with points;" % (eout,nout) where ' eout ' and ' nout ' are the two filenames. PS: I prefer not to use additional python modules (eg. gnuplot-py), only the standard API. Thank You 回答1: A simple approach might be to just write a third file containing your gnuplot

mixing date and time on gnuplot xaxis

僤鯓⒐⒋嵵緔 提交于 2019-12-17 14:56:20
问题 I'd like to plot hours of the day on the x axis, but print the date when the day rolls over from one day to the next. So the x axis might look like this: 11/02 04:00 08:00 12:00 16:00 20:00 11/03 04:00 08:00 ... Is there a sane way to do this in gnuplot? FWIW, my file currently looks something like this: set xdata time set timefmt "%Y-%m-%d|%H:%M:%S" plot '-' using 1:2 with lines linewidth 1 linecolor rgb "#FF0000" 2013-11-02|00:00:48 123.0 2013-11-02|00:00:55 124.0 2013-11-02|00:01:06 121.0

Plotting labeled intervals in matplotlib/gnuplot

吃可爱长大的小学妹 提交于 2019-12-17 10:41:11
问题 I have a data sample which looks like this: a 10:15:22 10:15:30 OK b 10:15:23 10:15:28 OK c 10:16:00 10:17:10 FAILED b 10:16:30 10:16:50 OK What I want is to plot the above data in the following way: captions ^ | c | *------* b | *---* *--* a | *--* |___________________ time > With the color of lines depending on the OK/FAILED status of the data point. Labels ( a/b/c/... ) may or may not repeat. As I've gathered from documentation for gnuplot and matplotlib , this type of a plot should be

Gnuplot plotting data from a file up to some row

十年热恋 提交于 2019-12-17 10:25:07
问题 I have data in some text file which has let's say 10000 rows and 2 columns. I know that I can plot it easily by plot "filename.txt" using 1:2 with lines . What I want is however just plotting let's say the rows from 1000 to 2000 or any other reasonable selection. Is it possible to do that easily? Thank you very much in advance. 回答1: Simpler: plot "<(sed -n '1000,2000p' filename.txt)" using 1:2 with lines 回答2: It appears that the "every" command in gnuplot is what you're looking for: plot

create heatmap2d from txt file

醉酒当歌 提交于 2019-12-17 09:54:36
问题 I have set of 2d data (30K) as txt file. X Y 2.50 135.89 2.50 135.06 2.50 110.85 2.50 140.92 2.50 157.53 2.50 114.61 2.50 119.53 2.50 154.14 2.50 136.48 2.51 176.85 2.51 147.19 2.51 115.59 2.51 144.57 2.51 148.34 2.51 136.73 2.51 118.89 2.51 145.73 2.51 131.43 2.51 118.17 2.51 149.68 2.51 132.33 I plotted as a scatter plot with gnuplot but I would like to represent as a heatmap2d or density distribution. I looked through the examples in MatPlotLib or R and they all seem to already start with

Octave-Gnuplot-AquaTerm error: set terminal aqua enhanced title “Figure 1”…unknown terminal type"

大憨熊 提交于 2019-12-17 08:02:30
问题 I've installed Octave and gnuplot via Homebrew, and downloaded AquaTerm.dmg. When I try to plot, I get the following message: octave:4> plot(x,y) gnuplot> set terminal aqua enhanced title "Figure 1" font "*,6" ^ `line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list` In a bash terminal set terminal , set Terminal , set term , (and the same, followed by "aqua" too) etc gives nothing. I've tried plotting again from octave having the "AquaTerm" already open, but nothing