gnuplot

How to treat the first line of the data file as column labels in gnuplot?

倖福魔咒の 提交于 2019-12-20 17:25:53
问题 I have a table like this: A B C D E F G H I 10 23998 16755 27656 17659 19708 20328 19377 18925 20 37298 33368 53936 41421 44548 40756 40985 37294 I use this command to plot plot "C:/file.txt" using 1:2 with lines smooth bezier, "C:/file.txt" using 1:3 with lines smooth bezier, ... However, all the labels come out as the file name. Is it possible for gnuplot to read the first row and label the lines accordingly? 回答1: set key autotitle columnhead 回答2: plot for [n=2:12] 'vv.csv' u 1:(column(n))

How to treat the first line of the data file as column labels in gnuplot?

北城余情 提交于 2019-12-20 17:25:21
问题 I have a table like this: A B C D E F G H I 10 23998 16755 27656 17659 19708 20328 19377 18925 20 37298 33368 53936 41421 44548 40756 40985 37294 I use this command to plot plot "C:/file.txt" using 1:2 with lines smooth bezier, "C:/file.txt" using 1:3 with lines smooth bezier, ... However, all the labels come out as the file name. Is it possible for gnuplot to read the first row and label the lines accordingly? 回答1: set key autotitle columnhead 回答2: plot for [n=2:12] 'vv.csv' u 1:(column(n))

Display underscore rather than subscript in gnuplot titles

a 夏天 提交于 2019-12-20 10:27:01
问题 Short question : How do I display the _ (underscore) character in a title in gnuplot that is assigned from a variable name in gnuplot? Details : I have something like the following code: items = "foo_abc foo_bcd bar_def" do for [item in items] { set title item set output item.eps plot item."-input.txt" using 1:2 title item with linespoints } This works fine with gnuplot except that the title get changed from foo_abc to foo a bc. I don't know if I want to use an escape character because I don

How to access Gnuplot's (auto)range values and modify them to add some margin?

一曲冷凌霜 提交于 2019-12-20 10:12:02
问题 Using the standard plot command, I get, what I want except that the yrange is set automatically from (eg) 275 to 300. Unfortunately, I have several data points with y-coordinate 300, such that they are not visible (due to border lines, etc.). So, is there any way to set the maximum yrange such that it is always the maximum data plus e.g. 5 units? Using autoscale , the yrange is set to 275:300. Setting explicitly the range to 275:305 would work for one data file but not for others. So I need

C++ and gnuplot

半世苍凉 提交于 2019-12-20 10:08:05
问题 This is my first post and I'm quite a novice on C++ and compiling in general. I'm compiling a program which requires some graphs to be drawn. The program create a .dat file and then i should open gnuplot and write plot ' .dat'. That's fine. Is there a way to make gnuplot automatically open and show me the plot I need? I should use some system() function in the code to call gnuplot but how can I make him plot what I need? Sorry for my non-perfect English :s Thanks for the attention anyway! 回答1

Looking at binary output from fortran on gnuplot

廉价感情. 提交于 2019-12-20 09:45:39
问题 So, I created a binary file with fortran, using something similar to this: open (3,file=filename,form="unformatted",access="sequential") write(3) matrix(i,:) The way I understand it, fortran pads the file with 4 bytes on either end of the file, and the rest is just the data that I want (in this case, a list of 1000 doubles). I want to read this in with gnuplot, however, I don't know how to get gnuplot to skip the first and last 4 bytes, and read the rest in as doubles. The documentation isn't

When using Gnuplot, how can the equation of a line be printed in the line title?

最后都变了- 提交于 2019-12-20 09:44:38
问题 I have used Gnuplot to plot my data, along with a linear regression line. Currently, the 'title' of this line, which has its equation calculated by Gnuplot, is just "f(x)". However, I would like the title to be the equation of the regression line, e.g. "y=mx+c". I can do this manually by reading off 'm' and 'c' from the plotting info output, then re-plot with the new title. I would like this process to be automated, and was wondering if this can be done, and how to go about doing it. 回答1:

gnuplot with errorbars plotting

こ雲淡風輕ζ 提交于 2019-12-20 09:37:46
问题 The data in my "file.txt" file are as in the following (sample row shown) 31 1772911000 6789494.2537881 Note that the second column is the mean and the third is the standard deviation of my input sample. So, for the error bar, I would need the bar at the x axis value 31, with the error bar start at (second column value)-(third column value), and end at (second column value)+(third column value). I tried the following: plot "file.txt" using ($1-$2):1:($2+$1) with errorbars but the result is

Gnuplot: Multiple Stacked Histograms, each group using the same key

丶灬走出姿态 提交于 2019-12-20 09:19:53
问题 I am trying to create a plot with multiple stacked histograms like example 8 here. But for my data, each group has the same four categories. How do I change the colors and the key so that colors go Red, Green, Blue, Pink for every stacked column? And so the key only has one copy each of the 4 things I am plotting? Here is the line I'm using to plot: plot newhistogram "1", 'addresses.dat' using 2:xtic(1) t 2, '' u 3 t 3, \ '' u 4 t 4, '' u 5 t 5, newhistogram "2", '' u 6 t 6, '' u 7 t 7, '' u

Zoom out in Octave / gnuplot

亡梦爱人 提交于 2019-12-20 08:21:47
问题 I use Octave with gnuplot under Windows. I can zoom in using the right mouse button. But how can I zoom out from the UI? 回答1: I found this post on Nabble. Pressing p takes you to the previous zoom level, n to the next level, and u unzooms. I pressed h in a gnuplot window outside of Octave and got this command list: 2x<B1> print coordinates to clipboard using `clipboardformat` (see keys '3', '4') <B2> annotate the graph using `mouseformat` (see keys '1', '2') or draw labels if `set mouse