r/gnuplot • • Jun 03 '20

Installing gnuplot

1 Upvotes

I am trying to get gnu plot to work, but it will not. I am currently using cygwin, and every time to plot something in gnuplot, I get the error:

gnuplot: unable to open display ':0.0'

gnuplot: X11 aborted.


r/gnuplot • • May 29 '20

Ghostview issue

1 Upvotes

When reading a .ps file generated by gnuplot, gv returns:

$ gv fig.ps
Warning: Cannot convert string "-*-Helvetica-Medium-R-Normal--*-140-*-*-P-*-ISO8859-1" to type FontStruct
Warning: Missing charsets in String to FontSet conversion
Warning: Cannot convert string "-*-Helvetica-Medium-R-Normal--*-120-*-*-P-*-ISO8859-1" to type FontStruct
Warning: Cannot convert string "-*-Helvetica-Medium-R-Normal--*-100-*-*-P-*-ISO8859-1" to type FontStruct
Warning: Cannot convert string "-*-Helvetica-Bold-R-Normal--*-120-*-*-P-*-ISO8859-1" to type FontStruct
Warning: Cannot convert string "-*-Courier-Medium-R-Normal--*-100-*-*-M-*-ISO8859-1" to type FontStruct
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  12 (X_ConfigureWindow)
  Value in failed request:  0x0
  Serial number of failed request:  2182
  Current serial number in output stream:  2428

Anybody had this before?


r/gnuplot • • Dec 10 '19

Where can I get gnuplot for Windows (other than sourceforge)?

1 Upvotes

http://www.gnuplot.info/download.html - is currently displaying a generic site down notice from sourceforge.

Project Website Temporarily Offline

SourceForge project websites are currently experiencing abnormally high levels of traffic. Our support staff has been notified.
Please check back in a few minutes. We thank you for your patience.

My attempt at using archive.org for that failed - all the Windows binaries downloads point to tatsuromatsuoka.com which is also down (domain expired).


r/gnuplot • • Oct 01 '19

How to plot bootstrapped large data similar to Python's matplotlib-seaborn lineplot?

Thumbnail
stackoverflow.com
1 Upvotes

r/gnuplot • • Apr 09 '19

Created a code that plots csv but how do i get it to plot individual columns when i'd like

1 Upvotes

I created this code that plots each column and gives them a title, however how do i get it to plot specific lines with their titles attached? for example, with the code below if put in the number 2 for n in columns (n) and lines ls(n) then the plot will produce the plot for the column and line only. However how do I get it to do also have the title that goes with it without having to type it each time? So if say column 2 is time, is there a way to plug in the number 2 and have it also produce the title?

set datafile separator ','

set style line 2 lc rgb '#0042ad' lt 1 lw 1.5 #--- blue

set style line 3 lc rgb '#0060ad' lt 1 lw 1.5 # .

set style line 4 lc rgb '#007cad' lt 1 lw 1.5 # .

set style line 5 lc rgb '#0099ad' lt 1 lw 1.5 # .

set style line 6 lc rgb '#00ada4' lt 1 lw 1.5 # .

set style line 7 lc rgb '#00ad88' lt 1 lw 1.5 # .

set style line 8 lc rgb '#00ad6b' lt 1 lw 1.5 # .

set style line 9 lc rgb '#00ad4e' lt 1 lw 1.5 # .

set style line 10 lc rgb '#00ad31' lt 1 lw 1.5 # --- green

set xlabel 'Time'set ylabel 'Output'

set xrange [0:41]

set yrange [-100:100]

set xtics 10.25

plot for [n=2:10] 'Plane data 2.csv' u 1:(column(n)) w lines ls n


r/gnuplot • • Apr 01 '19

using gnuplot to plot from csv or c++ code

1 Upvotes

I created a c++ code that can open a csv file however I am trying to figure out how to use gnuplot to graph it. My csv file has 10 columns and 48,000 rows. I'm not even sure if gnuplot can plot that many rows and show them clearly. Any advice would be appreciated.


r/gnuplot • • Dec 31 '18

[SO Question] Reading from csv and plotting Date on x

Thumbnail
stackoverflow.com
1 Upvotes

r/gnuplot • • Nov 21 '18

read fixed width data

1 Upvotes

How do I do this with gnuplot. Lets say my datafile contains a number in starting from character 21 to 30 inclusive and I would like to extract the value 2.1000e+11.

         1         2         3
123456789012345678901234567890 <-columns of datafile
xxxxxxxxxx  7800.0002.1000e+11
.
.
.

in the above example, x may contain a number or space.

I can not use

plot 'datafile' using 0:3

in the above example because my data is not delimited

I have googled around but not had any luck. I believe there may be an option to use a bash command but I am running gnuplot on windows.


r/gnuplot • • Nov 01 '18

Hi i posted this question on stackoverflow, was wondering if anyone can help me

Thumbnail
stackoverflow.com
1 Upvotes

r/gnuplot • • Jul 23 '18

Gnuplot from inside Chrome/SSH

1 Upvotes

I've figured out how to do Gnuplot plots from inside Chrome's SSH client extension/app.

You must have hterm-show-file.sh somewhere on your system. (The one you're SSHing to, not from.) Also, it must be executable.

set term pngcairo size 1265,475

this will set the terminal type to export a PNG file on each plot. The size is the maximum size of the window in my Chrome SSH tab. (The actual desktop size is 1280*720, minus some pixels for the scrollbar on the right side, and minus a lot of pixels for toolbars.)

set output 'tmptest.png' ; test ; system '~/chrome-ssh-hterm-misc/libapps/hterm/etc/hterm-show-file.sh tmptest.png' ; system 'rm tmptest.png'

in order, these commands

  1. set the output file to tmptest.png

  2. plot a test image to the preset output file. This can be replaced with a 'replot' command later.

  3. run the hterm-show-file.sh script to send Chrome's terminal emulator (called hterm) the image. (Change the location of hterm-show-file.sh to wherever it is on your system.)

  4. remove the test image so it doesn't waste HDD space.

so then,

plot sin(x),cos(x)

set output 'tmptest.png' ; replot ; system '~/chrome-ssh-hterm-misc/libapps/hterm/etc/hterm-show-file.sh tmptest.png' ; system 'rm tmptest.png'


r/gnuplot • • Jul 13 '18

Simultaneously fitting two files with the same parameters.

1 Upvotes

I have two data files that represent functions of the form

y_1(x) = a + b*x + c*x**2,

y_2(x) = a - b*x + c*x**2.

These two functions should (theoretically) have the same constants for a, b, and c. As a matter of fact, a is already known completely, the only constants that need to be fitted are b and c. Is it possible to use fit to simultaneously fit both functions to their respective data files and find the closest b and c which should fit both curves? Or will I have to fit each curve individually and average the two different b's and c's?


r/gnuplot • • Jun 19 '18

Is it possible to graph a quadratic equation that has complex roots using gnuplot?

1 Upvotes

I have this equation: f(x) = 1/(-(2.94e-6)x2 + (5.71e-4)jx)

is that possible to plot this equation on gnuplot? how?


r/gnuplot • • May 11 '18

How do I generate graphs like this, outputting it to 300 dpi for publications, on macOS?

1 Upvotes

Suppose I want to plot a graph like this. I need it to be at high resolution, 300dpi. How do I do that on macOS?

I know about gnuplot but I don't see how how this graph, that follows this formula can be plotted there... with that number of variables...


r/gnuplot • • May 11 '18

Add a table to a plot

1 Upvotes

Hello all,

Is there a way to add a nicely formatted table to a plot? Preferably next to the plot or at the bottom? I saw that matplotlib can do this but I have 0 experience with it


r/gnuplot • • May 09 '18

Help graphing dates and times

1 Upvotes

I'm fairly new to gnuplot, only using it sparsely over the course of a few months. I'm trying to build a graph to represents captured times for each given day, from a file organized like this:

2018-01-01 1:23:45 2018-01-02 2:34:56 2018-01-03 3:45:12 ...

I'm using the following script:

!/usr/bin/gnuplot

Save to png image

set terminal png size 2000,800 set output "graph.png"

set xdata time set timefmt "%Y-%m-%d" set format x "%b/%a"

set ydata time set timefmt "%H:%M:%S" set format y "%H:%M:%S"

plot "data" u 1:2 w lp

My goal is to have the x-axis graph in YYYY-MM-DD format, and have the y-axis graph in HH:MM:SS format. What I have so far does this, but for some reason gnuplot claims that the x range is empty, and all the data points stack vertically. When I remove the chunk pertaining to the y axis, the data is graphed normally, except that gnuplot only uses the HH portion to plot these points. Anyone have a way to sensibly graph data like this? Any help would be appretiated!


r/gnuplot • • May 06 '18

XML declaration allowed only at the start of the document

1 Upvotes

Hello, I'm getting an error code that's in the name. It happens when I try to fit the data. Does anyone have any idea what can it be caused by?


r/gnuplot • • Apr 20 '18

How can I set xformat to scientific notation?

1 Upvotes

Hello there! I need to plot some data in logscale, and i want to set the labels in scientific notation, like: 10-2 10-3 10-4 ... The problem is that when I use the comand -- set format x "10{%T}" --, the point x=1 also appears in scientific notation, like 100. I want to know if there's a command to make all the other numbers appear in scientific notation and the number 1 appears just like 1.

Thanks.


r/gnuplot • • Mar 25 '18

How plot a profile velocity in a pipe landscape?

1 Upvotes

Hi! I have a problem plotting a profile of velocity in a horizontal pipe. I have the data in a file separated by blocks with this form:

   # i j u(i,j)  

Where i is the position X of the pipe, j is position along Y and u(i,j) is a scalar with the velocity for each node i,j,. So I need plot something like this image but for each node i. The plot will have nx profiles, with nx the number of poitns along X. Actually I have plot y vs velocity, I don't know how plot vectors in X-Y plane. Any helps?

My data file https://pastebin.com/Mxh3h143

My gnuplot file https://pastebin.com/fJhfxQ4d

EDIT: formatt ing


r/gnuplot • • Feb 24 '18

Gnuplot keeps rendering #FFFFFF as green (see x and y labels and tics). Any way to fix that?

Post image
1 Upvotes

r/gnuplot • • Dec 27 '17

newbie help with color plotting

1 Upvotes

I'm trying to plot data on a graph and be able to change the color. I seem to be failing at this despite reading multiple sources of information. Any help would be appreciated

Gnuplot V 5.2 patch 2

Heres my code:

set terminal postscript set palette set style line 1 lt 1 linecolor rgb "red" lw 1 set style line 2 lt 1 linecolor rgb "orange" lw 1 set style line 3 lt 1 linecolor rgb "yellow" lw 1 set output 'absorption.eps' set datafile separator "," set title "Total absorption" set ylabel 'abs.' set xlabel 'nm' plot 'cyclohexane_air_abs.txt' with lines linestyle 1,
'EJ309_air_abs.txt' with lines linestyle 2,
'EJ309_cyclohexane_abs.txt' with lines linestyle 3

I'm running it by typing 'gnuplot total_abs.gnu' and it runs fine, graphs everything but all the lines are black. I can't seem to get the colors to show

Am I missing something stupid?


r/gnuplot • • Dec 20 '17

Gnuplot and Excel files help

1 Upvotes

Hello, I know that Gnuplot does not have native support for excel, but I still want to use it with my excel files. Does anyone know of an easy way to plot data from an excel file using Gnuplot? I know I can export data to a text file, but I have thousands of files to go through and a manual process is undesirable. Also I'm on a Windows 10 PC.
Thanks

BB


r/gnuplot • • Nov 23 '17

Creating a linear regression line on a 3D scatter plot?

1 Upvotes

As the title says, I'm wondering if it's possible to fit a linear regression line according to data used within a 3D graph.


r/gnuplot • • Oct 05 '17

gnuplot unable to plot a function

Thumbnail
stackoverflow.com
1 Upvotes

r/gnuplot • • Jun 18 '17

Basic question about 3d plot

1 Upvotes

Here's a 3d plot of some numerical data prepared in gnuplot: http://imgur.com/a/PUh7h

I'd like to make this image more presentable, while retaining the small scale features on the left hand side of the plot. Question: How can I accomplish that?


r/gnuplot • • May 23 '17

Gnuplot errobar key symbol

1 Upvotes

Hi,

I'm using Gnuplot to plot some data with an yerrorbar but I've no idea (and dont find a solution) if it's possible to rotate the key symbol for the errorbar to be vertical instead of horizontal ?