FAQ Database Discussion Community

## Gnuplot plot two data with different time format

plot,gnuplot,time-format
I have two data with different time format: file1 (%Y %j %H %M %S vel): 2011 170 0 0 0 0.017042 2011 170 0 30 0 0.002124 2011 170 1 0 0 0.061001 2011 170 1 30 0 0.096256 2011 170 2 0 0 0.073920 2011 170 2 30 0...

## Application of Gnuplot figure as transparent on top of image

plot,gnuplot
I would like plot on the top of png figure as transparent and no axes in Gnuplot. If legend can be fitted there, it would be great. Its code which is based on many discussions of mine in gnuplot here set xrange [2014:2050]; set yrange [40:125]; set datafile separator "...

## gnuplot: draw polygon from data

gnuplot
How can I plot polygons with data coming from a file? For example if I have a file containing coordinates of the edges of a four-point polygon for each data point, how would I proceed? e.g. a data file containing 0 0 0 1 1 1 1 0 2 2...

## gnuplot - get errors on fit parameters, get fit output values as variables, print variable to screen

variables,gnuplot,curve-fitting,data-fitting,function-fitting
Initial Question (Partially Answered) I am using gnuplot's fitting routines to fit a function to some data, and extract a "characteristic decay time constant". (I call this parameter d in my fitting function.) I have used the script code set fit quiet to prevent reams of text being printed to...

## Changing title within loop

gnuplot
I am using gnuplot 5.0, and I have a data set I would like to plot using key1 = 'Some title with multiple words' key2 = 'Some other descriptive title ' key3 = '...and a third title' plot for[i=1:3] datafile index i-1 using 1:2 with lines title eval('key'.i) This is...

## Offset gnuplot grid lines so that they match xtics

gnuplot
How do I move the vertical grid lines so that they match the horizontal labels/xtics? In the following image, the vertical grid lines don't line up with the xtics: I tried setting the xtics offset before setting the grid, but that doesn't seem to work.Here's my current script: #!/usr/bin/gnuplot -persist...

## Does anyone know how to get rid of the “small bar” in a gnuplot graph?

gnuplot
Below is my gnuplot code. set term pdf enhanced set output "plot/test.pdf" set datafile separator "," set xtics norangelimit set ytics nomirror set termoption dashed set xlabel "times" set yrange [0:100] set xtics nomirror set grid ytics set key right bottom plot 'plot/test.csv' using 2:xtic((int($0)%20)==0?sprintf("%d",$0*10):"") title "Comparing with the...

## Gnuplot, normalize over x axis

gnuplot
I've got two datasets referring to the same process executed in two different ways. The execution A is slower than the execution B with respect to real time, but the two graphs represent the same phenomena.. I can plot the two together as follows: plot 'A' using 1:2, 'B' using...

## Gnuplot: Conditional splot of a function

conditional,gnuplot
I want to splot the function exp(-(x²+y²)) alone and under the constraint of x+y-1=0. The result should be the surface alone as well as a line with a maximum at x=y=0.5. Or in other words, it's the intersection of the function with a (110)-plane. What I came up so far...

## How do I skip rows in Gnuplot when plotting a heat map?

gnuplot,heatmap
I'm trying to plot a heat map in Gnuplot: set view map set size square set cbrange [0:1] splot "input.dat" 1:4:8 w pm3d But I want to skip the rows with the data in the first & fourth column in a particular range without changing xrange and yrange. How can...

## specific gnuplot by data grouping

data,gnuplot,std,mean
I'm new in gnuplot and sorry that my problem formulation might be unprecise, but I don't know how to find the tools/commnds needed to solve my problem. The code for plotting I would like to integrate in my bash file. I have a data set like: 285 1 50 7.35092...

## Whether is it possible to plot normal probability distribution in gnuplot

linux,shell,plot,gnuplot
My data file is as- 2 3 4 1 5 2 0 3 4 5 3 2 0 3 4 0 5 4 3 2 3 4 4 0 5 3 2 3 4 5 1 3 4 My requirement is to plot normal PDF in gnuplot. I could do...

## Set arbitrary base of logarithm in gnuplot

gnuplot
I would like to ask how can I set arbitrary base of logarithm in gnuplot (I would need f(x)=x^{1+9log2(x)} function to plot).

## Plot all files in a directory simultanously with gnuplot?

gnuplot
I want to do something similar to this question: gnuplot : plotting data from multiple input files in a single graph. I want to plot simultaneously all the files in a directory, without having to explicitly write their names. The column numbers are the same for all the files. What...

## Surface plot piping to gnuplot from C

c,2d,gnuplot,surface,piping
I've made a function which successfully pipes data from my C program to gnuplot: void gnuprintabs(FILE *gp,double **RE,double **IM, double x[], int N) { int i,j; fprintf(gp, "splot '-'\n"); for (i=0; i<N; i++) { for(j=0; j<N; j++) { fprintf(gp, "%g %g %g\n", x[i],x[j],sqrt(RE[i][j]*RE[i][j]+IM[i][j]*IM[i][j])); } } fflush(gp); fprintf(gp, "e\n"); } The...

## Gnuplot: Plotting different functions in a loop

function,loops,gnuplot
I'd like to plot the Hermite polynomials in the same graph without having to type them one by one using a loop. I've tried something like this: H0(x) = 1 H1(x) = 2*x H2(x) = 4*x*x-2 H3(x) = 8*x**3-12*x H4(x) = 16*x**4-48*x**2+12 H5(x) = 32*x**5-160*x**3+120*x plot for[i=0:5] H.i(x) but It...

## How to plot histograms from rows in data file gnuplot

gnuplot,histogram
t.dat file looks like this: 260.37 260.04 261.53 261.32 260.19 260.49 260.43 260.59 260.26 260.68 260.28 259.93 260.82 259.50 260.29 260.52 260.30 259.91 262.24 260.58 260.74 260.22 261.66 260.31 260.99 259.79 260.90 259.88 260.19 261.50 259.32 260.79 259.94 260.35 260.03 260.07 261.86 261.09 260.60 260.15 75.17 75.16 75.33 75.31 75.34...

## How to Set Precision in GNU Plot Graph Range?

gnuplot
I set the range in my plot like such set yrange[ 0.000 : 0.040 ] and the graph's interval is 0.005 on the y-axis. The y-axis reads like 0.04 0.035 0.03 0.025 0.02 0.015 0.01 0.005 0 on the side of the graph. This looks totally inconsistent. How can I...

## Set with lines in gnuplot

gnuplot
I can connect the dots of a data file by including with lines in the plot command. Is there a way to set this fixed (I was hoping for set with lines) so I don't have to explicitly include it in every call of plot?

## Extend x-axis beyond xrange in gnuplot

gnuplot,axis
I am trying to draw a larger x-axis than my xrange. I.e. my xrange is [0:10] I plot f(x)=sin(x) But I want the x-scale to be from 0 to 15 xtics doesn't solve this problem as it will not extent beyond the set xrange. jlinkels...

## Running gnuplot from Fortran program under Windows

windows,fortran,gnuplot
I need to make a Fortran program(.exe) that analyses data and builds a plot. I've decided to do this by calling gnuplot from my Fortran program along with a gnuplot settings file. When I do this from Windows Command Line: wgnuplot -persist input.txt it works fine. But when I call...

## gnuplot - How can I count the number of entries in a csv file column?

csv,plot,gnuplot,function-fitting
I have a gnuplot code which includes a function fitting routine. This routine is slow when a large number of data points must be fitted. The number of data points in my input file is variable depending on the parameters of some simulations I am running. I wish to fit...

## Animating a single data file using gnuplot

animation,gnuplot
I use FORTRAN 77 code to generate data (saved as filename.dat) of simple physics situations containing x-y co-ordinates like a projectile. My data files usually have 2 or 3 columns like so: 1 1 2 2 3 3 4 4 5 5 I can plot (2d and 3d) using Gnuplot...

## how to plot a graph using gnuplot from C++ program

c++,gnuplot
Following is the code I have used to write data (x and y coordinates)into a file. void display(){ fstream out; outfile.open("Co_ordinates.txt",fstream::out | fstream::trunc); outfile.precision(6); for(int i=0;i<3000; i++){ outfile<<fixed<<x[i]<<" "<<fixed<<y[i]<<endl; } out.close(); } I want to plot the graph using the x and y coordinates from the above file "Co_ordinates.txt" I...

## Passing variable to gnuplot via -e causes not persistent window

bash,shell,gnuplot
I want to run either persistent gnuplot or write output to file. This behavior should be affected by passing variable. Here is my test.plg: #!/usr/bin/gnuplot -p if (exists("file")) set term png; set output "test.png"; if (!exists("name")) exit; set title name plot sin(x) If I run script this way it is...

## To plot stacked histogram in Gnuplot from this data

plot,gnuplot
Data Year Water Power Wood Power 2025 58.1 41.9 2035 55.8 44.2 2050 50.6 49.4 Code set style histogram columnstacked; set terminal qt size 560,270; set grid; set offset 1,1,0,0; plot 'RES.dat' u 1:3; which gives where it somehow omits the first sentence of the command. I tried to set...

## How to select subplot in gnuplot multiplot mode

gnuplot,subplot
is there any way to select a subplot in gnuplot's multiplot mode as in subplot(n,m,x) in Matlab where x is the one I want to plot at? I am plotting three points using linespoints on a graph in red color at first, then I want to plot a single point...

## gnuplot conditional plotting with if

gnuplot
I have a data file with two columns 10 0.5 20 0.8 25 0.3 15 0.6 I want to plot the second column if the first column is less than or equal 20. Problem is, I want to skip the rows where the first column is greater than 20, however...

## Plotting in matlab / octave by grouping numbers into a range

matlab,plot,gnuplot,octave
I'm trying to have the data be the x-axis and the y-axis be the amount of values grouped by 10. See Plot below as example I tried using bar(x) but I'm not sure how you get the numbers in the correct categories for plotting. example: if the data is x=1,5.3,9,10.5,12,13,15.2,25,191,192.4...

## Gnuplot command with multiple “with” arguments

command-line,plot,gnuplot
Plotting in Gnuplot: For example if one tries to both set the datapoint type and the errorbars into one command, there's a conflict of "with" arguments, i.e.: plot "test.csv" using 1:2:3 with points pointtype 5 with yerrorbars The error message is as follows: duplicated or contradicting arguments in plot options....

## How to left align key text in gnuplot?

gnuplot
By default, gnuplot aligns keys on right. Since I'm putting the legend on the top right section, I'd like to align them on left. ...

## Gnuplot: how to mimic sketch graphs

gnuplot,sketching
I want to plot a figure like this one: but with only sketched data curves. The x and y axes should not be sketched. Is this possible using Gnuplot?...

## Gnuplot different colors inside newhistogram

gnuplot,histogram
I am plotting a histogram rowstacked very similar to this graph (the last one on this page) : What I would like to do is to have different colors for each year bin. This colors would repeat from a newhistogram to another. I have not yet found a way to...

## gnuplot, multidimensional array, plotting, matrix,

arrays,matrix,multidimensional-array,plot,gnuplot
I am new to GNUPLOT and, I have encountered a problem which I do not know how to deal with. Any help from your side will be appreciated. The problem is: I have two files, say "A.dat" and "B. dat". Both are multidimensional array data. To be exact, A.dat has...

## Remove redundant file names in gnuplot figure

gnuplot
I wrote a simple gnuplot shell script #!/usr/bin/gnuplot reset set terminal png set xlabel "Time" set ylabel "Prime and Probe #" plot "file.dat" with points Notice that there is an annoying "file.dat" on the upper right corner. How can I remove that? gnuplot Version 4.6 patchlevel 4 ...

## Symbols in Gnuplot label

plot,gnuplot
Code in terminal qt and gnuplot 5.0 plot x; set xlabel 'Magnetic field {/Symbol Mu}_0' which works in gnuplot prompt. However, {/Symbol mu}_0 is not working in Commandline script /usr/local/bin/gnuplot -e "plot x; set xlabel 'Magnetic field {/Symbol m}_0 H / mT'; I get gdImageStringFT: No character set found while...

## Gnuplot: Multiplot size and scaling of one plot

gnuplot,histogram
I have this multiplot: Generated by the following code: set terminal pdf size 15,10 set output "graph.pdf" set key off set multiplot layout 5, 1 scale 1, 1 set style data histograms set style histogram set style fill solid border -1 set boxwidth 0.75 set yrange [0:178] set ytics 50...

## Counting number of plotted points in gnuplot

gnuplot
The data file contains values in the following format: 0 0 50 0 1 70 1 0 40 1 1 70 2 0 110 2 1 60 3 0 60 3 1 120 4 0 50 4 1 50 5 0 70 5 1 70 This is a code snippet...

## Gnuplot lc palette not working with timefmt

timestamp,gnuplot,palette
I am plotting a graph with regular variables on the x and y axis and I want the line to change color with respect a time variable. I have tried using lc palette after defining one and even the colorbox appears but the line doesn't change color. I also tried...

## Plotting the inverse of the numbers in columns in gnuplot with for loop

for-loop,gnuplot
I want to plot the inverse of the numbers in a number of columns against the first column: plot for [i=1:30] 'file' using 1:(1/i) w lp which results in all the y values to be zero. It works when I remove the for loop and just pick a column to...

## gnuplot rowstacked histogram: how to put sum above bars

label,gnuplot,histogram
This question is related to gnuplot histogram: How to put values on top of bars. I have a datafile file.dat: x y1 y2 1 2 3 2 3 4 3 4 5 and the gnuplot: set style data histogram; set style histogram rowstacked; plot newhistogram 'foo', 'file.dat' u 2:xtic(1) t...

## GNUPLOT: Joining different series of points with vectors

function,vector,gnuplot,points
I have a file with data in 2 columns X and Y. There are some blocks and they are separated by a blank line. I want to join the points (given by their coordenates x and y in the file) in each block using vectors. I'm trying to use these...

## How to highlight regions of plot with gnuplot

I'd appreciate if somebody can help with this question. I am working with a radar (or spiderweb) plot with gnuplot 5.0.0: The scale and range in all axes is the same. The numbers at and beyond 1 have a special meaning and I would like to highlight that. I am...

## gnuplot highlighting points when with lines

plot,gnuplot,highlight
I have 4 points I would like to plot using gnuplot, but with lines. The problem is, I can't find how to highlight these 4 points on the drawn line. I would like for the plot to be a line through the points, but that these points are also clearly...

## Define font style as a variable

gnuplot
Is it possible to define different font styles (in gnuplot), so that I can refer to them later by an index instead of repeating them all every time, for example: font1 = font "Helvetica,12" ; font2 = font "Verdana, 12" and so on

## Set label on group multiplot in gnuplot

linux,graph,plot,gnuplot
Im plotting one picture with 4 different graphs using gnuplot. Labels for their x and y axes have the same meaning. If Im plotting it like this: set multiplot layout 2,2 rowsfirst set xlabel "x" set ylabel "y" set title offset -3,-3 set xrange [20:70] set yrange [0:15000] set title...

## Gnuplot: Fitting asymptotic curve to data

gnuplot
I am trying to fit an asymptotic curve to my data using gnuplot. It is a dataset showing reaction time results over a testing period. I have been able to plot the data and fit a straight line through it using the following code. f(x) = a*x + c; fit...

## Distinct bars of different group in Gnuplot for printing

plot,gnuplot,histogram
The problem for me is how plot (using gnuplot) bars with different styles in a figure so that they can be print. Take data from http://www.ibm.com/developerworks/aix/library/au-gnuplot/ for example, the data is: #Disk.txt hdisk2 420 425 410 hdisk3 700 780 760 hdisk4 450 450 452 hdisk5 680 702 690 hdisk6 320...

## gnuplot command line arguments and call arguments

gnuplot,command-line-interface,interactive

## How to draw a histogram with broken x-axis and string labels?

gnuplot,histogram
I am trying to draw a histogram with broken x-axis. I learnt the basic solution from this post. However, the x-axis of my histogram is based on strings, not number. It's like this: set terminal pdf set output "test-bar.pdf" set boxwidth 1.0 absolute set style fill solid 1 border 0...

## GNUPLOT how to add more space to indexes in labels

plot,gnuplot
I try to put the space to the index in the letters of the labels of Gnuplot. I use the following command: set terminal pngcairo size 500,400 enhanced font 'Verdana,10' set output 'test.png' set xlabel 'atan(~{/Symbol w}{.6\~}_2)' set ylabel 'atan(~{/Symbol w}{.6\~}_2)' plot sin(x) As you can see from the plot...

## C++ Pass a string into a pipe to gnuplot

c++,string,pipe,gnuplot
I'm having a small problem passing a string to gnuplot from c++ I can pass integers easily enough, but when I try a string (user defined as "title" earlier in the code): fprintf(gnuplotPipe, "set title %s\n", title); I get the error: error: cannot pass objects of non-trivially-copyable type ‘std::string {aka...

## plotting points in 3d surface using x,y,z coordinates

3d,gnuplot
I need to plot some points in 3d surface based on x,y,z coordiantes values in a file named as test.dat test.dat file contains At-No X Y Z 6 3.532210 -2.171743 0.921140 7 1.164869 -1.418981 0.782133 1 2.454732 2.332989 -0.907213 6 -3.246376 -1.047325 -0.602590 6 -2.620684 0.053348 -0.013310 6 -4.569969 -1.249720...

## How can I plot several charts from a set of sample data?

gnuplot
I've got a dataset that I'd like to generate a set of plots from, and I'm having trouble getting gnuplot to do it. I've got a dataset with the following columns: time (timestamp in ISO-8601 format YYYY-MM-DDTHH:mm:ss.sssZ) client (hostname of the client; two distinct clients in the dataset) server (hostname...

## gnuplot wxt not working anymore

gnuplot
I have recently upgraded to Debian jessie, meaning that I have upgraded from gnuplot 4.6.0 to gnuplot 4.6.6 (issue is the same with gnuplot 5.0). I have bash scripts automating things, and launching gnuplot terminal. I was using either: gnuplot -persist -e "set title 'Sine curve'; plot sin(x)" or gnuplot...

## Gnuplot exit on window close

gnuplot
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...

## Gnuplot 3D - plot scatter points and a surface *and* lines between the them

plot,3d,gnuplot,surface,scatter3d
I've been unable to find a way of producing the plot described in the title, does anyone know how to do this if it's possible? I'd like to plot a surface from a function, and plot points from a file, and have lines drawn between the points and the surface....

## How to plot columns numbered greater than 1000 in gnuplot

plot,gnuplot
I have a file with 1600 columns. plot "file" using 1:999 title columnhead(999) plots column 999, but plot "file" using 1:1000 title columnhead(1000) produces column 100 instead of 1000, producing the same result as plot "file" using 1:100 title columnhead(100) Apparently large column numbers are wrapped. Is there a work-around...

## Generating a Heatmap Table in gnuplot

matrix,gnuplot,heatmap
I am trying to generate a Heatmap with gnuplot but with a two distinct information for each entry in the heatmap. While heatmap shows the value as color, I want each block in the heatmap to show textual information as well. The following script creates half of what I have...

## Creating a hexplot

r,matlab,matplotlib,gnuplot,matlab-figure
I am trying to create a figure like the one depicted in the third column of the following image: Link for the image in case of backup. Basically I have x and y positions of 200 particles and I have the MSD data for these 200 positions. I'd like MSD...

## Gnuplot plotting all datafiles automatically

bash,gnuplot
I have multiple *.data files each has same format and can be plotted with this simple script: cat << __EOF | gnuplot -persist set terminal pdf set output 'out.pdf' set datafile separator ";" set boxwidth 0.5 set style fill solid plot "xxx.dat" using 1:3:xtic(2) with boxes __EOF How can i...

## how to automatically sort the x values in gnuplot

sorting,gnuplot
When I try to plot something with linespoints, unless the values that go to the x axis are already sorted within the file, each point gets connected to the point that is on the next line of the file: Only when I sort the values in the file I can...

## Gnuplot two x-axis from different files

gnuplot,axis
I want to plot data in a plot with two different x-axes. One should be Time in years the other one time in MJD. This is an example from file 1 (x in years): 2011.27466 0.012 2011.71704 0.019 2011.71716 0.021 2011.87012 0.045 This is an example from file 2 (x...

key,gnuplot,histogram,legend
I have a simple gnuplot script to plot a histogram with differently colored bars, with each color representing a group. How can I show 3 different keys (1 red, 1 green and 1 blue)? This is my script: unset title set key left set yrange [0:10] set ylabel 'Score' set...

## Matching a Color Gradient to Data in Gnuplot

I have data showing a change over time, and I have used Gnuplot 4.6 to generate the following plot: Here, I have manually defined eleven line styles to change the color gradually from red (#ff0000) to dark red (#5f0000) as `time' progresses. Here was my input: # svg set terminal...

## gnuplot - splot inline data and point labels

gnuplot,labels
Hi Im using this data to get a 3d/2d like histogram. I want to label each histogram column with a 'dx cx' label preferable on top of the column. With my example the graph is drawing correctly, but there are no labels. if I'm using only the using 1:2:3:4 with...

## Lost Data Point in Gnuplot

gnuplot
I have a simple time series: 2015-05-03 07:00,58 2015-05-03 08:00,61 2015-05-03 09:00,65 2015-05-03 10:00,69 2015-05-03 11:00,72 2015-05-03 12:00,74 2015-05-03 13:00,76 2015-05-03 14:00,78 2015-05-03 15:00,78 2015-05-03 16:00,78 2015-05-03 17:00,77 2015-05-03 18:00,76 2015-05-03 19:00,73 2015-05-03 20:00,70 2015-05-03 21:00,67 2015-05-03 22:00,66 2015-05-03 23:00,64 2015-05-04 00:00,63 2015-05-04 01:00,62 2015-05-04 02:00,62 2015-05-04 03:00,61 2015-05-04 04:00,61...

## How to get my Mac OS X terminal to control gunplot properly?

gnuplot
I am using gunplot on mac os x (Yosemite). I can plot data, but I can't do a lot of customization: commands like: set tics "", or rotate by ... don't work. Do you think it's a problem from the installation or terminal? Thanks!...

## Can I have multiple colors in a gnuplot label?

label,gnuplot
I have this graph in gnuplot: I want to include totals for each of the three colored line graphs. One possibility is to replace the key with this: Can I plot this with a single label that switches colors? If not then I'd have to use six labels. In that...

## Is it possible to “print” gnuplot's output directly to STDOUT?

c++,gnuplot
I am using a third-parter utility named gnuplot-iostream to invoke gnuplot from C++ in the back-end of a web application. That web application is executed under CGI, so anything that goes to STDOUT is the result to browser. In this case, the web request will be for the image itself,...

## Gnuplot graph with circles, color and radius dependent on input

gnuplot
I have to make graph with gnuplot from some kind of input data. There is date, score and count for every entry. Graph should be with x axis representing date (I'll probably have question for that in the future too :/ ), y axis score and count should be represented...

gnuplot,javaplot

## Two Boxplots for one X position using gnuplot

graph,gnuplot,boxplot
I have 2 sets of data A and B, each with a y value for x=100, 200, 300. I want to create one graph which shows the difference between these two data sets. As such this means that for each x, there will be two boxplots(one for data A and...

## C++ Gnuplot pipe input from C++ defined variables

c++,pipe,gnuplot
I am using C++ to pipe commands to gnuplot using the following code: FILE *gnuplotPipe = popen("gnuplot -persist", "w"); // Open a pipe to gnuplot if (gnuplotPipe) { // If gnuplot is found fprintf(gnuplotPipe, "reset\n"); //gnuplot commands fprintf(gnuplotPipe, "n='500'\n"); fprintf(gnuplotPipe, "max='1500'\n"); fprintf(gnuplotPipe, "min='-1500\n"); fprintf(gnuplotPipe, "width=(max-min)/n\n"); fprintf(gnuplotPipe, "hist(x,width)=width*floor(x/width)+width/2.0\n"); fprintf(gnuplotPipe, "set term...

## How to get labels on top of bars in gnuplot

gnuplot
I want a barchart with labels on top of the bars, showing a group of bars, with errors, and labels on top of the bars indicating how much this bar differs from the first one. Although i get the positioning about right, it is always a little off. Y seems...

## Gnuplot: plot 2D graph with variable points sizes and colors

plot,colors,gnuplot,javaplot
I have been trying to plot scatter data with points where the size and colors depend on the input. I have check some others examples and I get to write this, but then I get that error message plot '-' using 1:2:3:4:5 with labels hypertext point pt 7 ps var...

## Can I set a default Y range in gnuplot?

gnuplot
My graphs will be generated based on runtime data, such as user-provided time ranges. I can't know ahead of time whether data within the requested xrange will actually exist. In the case that it's not, I'd like to show a blank plot (with X=time range as requested, but arbitrary Y...

## Gnuplot: plotting from string skips the first line

string,plot,echo,gnuplot,popen
Here's my minimal Gnuplot script: data="3.000000\t49.200000\n3.500000\t42.800000\n4.000000\t37.800000\n4.500000\t33.800000\n5.000000\t30.400000\n5.500000\t28.000000\n" plot '< echo -e '.sprintf('"%s"', data) using 1:2 title 'there is no data point for x=3.0?' w linespoints In my actual script, of course, I populate the data string in a different way (using the stats command), so saving the data to a file...

## Is it possible to read the value of a label in gnuplot from a file

gnuplot
Creating labels in gnulot is quite simple set label "<value>" at <x,y> ... But I want to read the value of a label in gnuplot from a file. The lines in the file look this way: ... 400 300 8 0.200214 1.00193 7.42157 8.623714 86.06 13.94 1.26 800 600 1...

## Calling Gnuplot in Swift

I'm trying to call gunplot from swift to produce some plots in .png. However, the program below does not work --- the resulting 1.png file is empty. If I leave the "set term aqua" though, it does call the aqua window with the plot in it. However when I try...

## Gnuplot bar chart from this CSV input

bash,gnuplot
I have csv file data.dat for example with these values: #W=1 0;sqlite;11500 1;hsql;14550 2;h2;17550 #W=2 0;sqlite;11000 1;hsql;13800 2;h2;16500 #W=3 0;sqlite;11000 1;hsql;13800 2;h2;16500 #W=4 0;sqlite;11000 1;hsql;13800 2;h2;16500 I need to plot bar charts into pdf. each data for each graph starts with title #W1,#W2.... i have tried this script: cat <<...

## gnuplot: plotting with image, how to add a contour

gnuplot
I have the following scenario: I plot data using with image to plot a map of intensity levels. They are already binned. Now I am looking for a way to plot the same data such that I can get a contour plot. I want to this so that I can...

## Plotting multiple columns with a for loop in gnuplot, key doesn't work

for-loop,gnuplot
I have file with many columns that I'd like to plot as follows: plot for [i=1:30] 'test' using 1:i w lp This gives the plot I want, but when I do set key, then the key I see has all lines labeled as 1:i: How can I make this output...

## How to output smooth cspline curve as a data file

output,gnuplot,smooth
Does anybody know how to extract some data of smooth cspline curve for a given data? For instance, there is a data file which has 2 columns corresponding to x and y values. I can draw the data with smooth cpline curve by the following commands p 'data' w lp,...

## Remove thing from gnuplot's legend

gnuplot
I have to plot three implicit functions using gnuplot, I use this: set contour set cntrparam levels discrete 0 set view map unset surface set isosamples 1000,1000 set xrange [-5:7] set yrange [-15:15] set xlabel "x" set ylabel "y" splot y**2-x**3+15*x-13 t "t1", y**2-x**3+15*x-sqrt(4.*15.**3/27.) t "singular", y**2-x**3+15*x-30 t "t2", y**2-x**3+15*x-13...

## gnuplot: scale axis of matrix plot

gnuplot
I have a matrix, output.dat: 0 0 0 0 0 0 3 7 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11 16 6 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

## Gnuplot - Graphic appears and disappears when zooming

graphics,gnuplot
I'm trying to plot some graphics in gnuplot, and I find out that canvas doesn't show the whole curve. It shows different graphics for different zooms. What could I do to solve this?...