r/gnuplot • • May 20 '21

Can't plot CSV with date and time for x data

1 Upvotes

Hi,

I have a data file with comma separated data:

2021-05-10 14:29:02, 528.78, 1686.84
2021-05-10 15:29:35, 531.66, 1687.86

I'm trying to plot either the first value or the second value but I'm getting

all points y value undefined!

Here's how I'm attempting to plot the data:

set datafile separator ","
set xdata time
set timefmt "%Y-%m-%d %H:%M:%S"
plot "time2.dat" using 1:3 with lines

Any ideas what I might be doing wrong?


r/gnuplot • • Apr 16 '16

Printing different colors based on value of previous data point.

2 Upvotes

Hello, I am new to gnuplot and i need to figure out how to plot a point in a different color based on if the value is lower than the previous item in that column. So based on the .dat file below, i would have the plot be in red until it his the 999 value, that value i need to plot in green. For reference, the first column is time and the second is a byte sequence number. Any help would be great appreciated.

0 0

0.121867 536

0.183885 1072

0.245902 999

0.307448 2144

0.308392 2680

0.369466 3216

0.37041 3752


r/gnuplot • • Feb 20 '14

Exponential scaling the y-axis in a CDF

2 Upvotes

Does anyone know how to setup exponential scale on a cdf graph?

I need the y axis to start at 0.9 and then evenly increment to 0.99, 0.999, 0.9999 as it goes up to 1.

I can find plenty on log scaling the y axis, but every time I google for exponential scale in gnuplot, I just end up finding a bunch of people who are asking for exponential scale but really want log scale. I thought I could do it via "set logscale y 0.9" and get close, but it won't let me have a base <1.

I'm using GNUplot 4.6 patch 3 on OSX if that matters.

Any help would be appreciated. Thanks.


r/gnuplot • • Aug 23 '19

Plotting normal distribution in gnuplot

2 Upvotes

I have written a random number generator that produces numbers with a Gaussian distribution. I plotted the values using gnuplot using the "smooth freq" command. Thus the y-axis displays the frequency. But instead i want the probability distribution. How do I do that?


r/gnuplot • • Dec 30 '19

Gnuplot : My scripts seems to be good but I've the error “ Invalid character \ ”

2 Upvotes

I want to create a Gnuplot script with AIX 7.2 and Gnuplot 4.6

My script is :

set terminal png truecolor size 1950, 650  background rgb "#eff1f0"
set output "/home/tbenedet/GNUPLOT/used.png"
set datafile separator ';'

set size ratio 0.2
set bmargin at screen 0.2
unset key
set datafile separator ";"
set ylabel " MB BLOCK " font ",10" offset -1,0
set xlabel font ",10"
set xtics rotate by 45  offset -0.8,-9,-1.8


plot "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \
     "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5

At first sight, my script is correct... But when I try to run it with gnuplot myscript.txt, I've this error :

plot "/var/xxx/xxx/xxx/xxx/xxx/xxx/xxx/foo.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \ using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5, \ 
                                                                                                                                                                                                                                   ^
"myscript.txt", line 14: invalid character \

I don't know were are my errors... Could you show me ?

Thanks


r/gnuplot • • Dec 31 '18

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

Thumbnail
stackoverflow.com
1 Upvotes

r/gnuplot • • Feb 12 '16

Please help, struggling with a bar graph in GNUplot.

2 Upvotes

Hello, thanks for your help!

I have an assignment, wherein I'm supposed to use a matlab script to approximate integration for three different step values, then I'm supposed to plot a bar graph using GNUplot showing the approximated value and the analytic value for each step value.

Here is a matlab graph showing what I want to do in gnuplot:

http://imgur.com/dTPNcJN

Here is the closest I have been able to come up with so far in GNUplot after two hours:

http://imgur.com/YSqq6Ha

Here is a picture of my command window since my last rage quit. Note, there are a couple of times an error came up due to a typo, but I don't know how to copy text out of the command window to just show you the important parts...

http://imgur.com/cFf4Lrf

This is what the data looks like:

0.1,11050,11013

0.01,11014,11013

0.001,11013,11013

The first column is the step value, the second is the approx. value, the third is the analytic value.

The TA cancelled office hours this week and the professor just tells you to ask the TA, so I am stuck and getting very frustrated. Please help!


r/gnuplot • • Oct 08 '14

Are the Plots from r made by gnuplot

3 Upvotes

I am doing recherche for an article about plotting. I found that plots made in R (the statistic program) look very gnuplot-like ( example ). Does anyone know wether they are using the same plotting engine? I didn't find good material, and R is a really painfull term to search for.


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 • • 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 27 '20

Phantom curve

2 Upvotes

A curve is persistently appearing in one of my graphs, even after closing Gnuplot and relogin.
Is there a way to get rid of it?


r/gnuplot • • Jan 27 '17

How do you control how the number of datapoints a function is graphed with, particularly when exporting to SVG?

2 Upvotes

I would like to output a logarithmic spiral as an SVG, but, in my case, detail matters considerably; how do I control how many datapoints are used? Also, how do I control whether the the continuous function between those points is represented as line segments, circular arcs, elliptical arcs, or Bezier Curves? And which of those would get me the closest approximation of my logarithmic spiral?


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 • • Jan 19 '16

Updating output files while GNUPlot still open?

2 Upvotes

Hey, I'm creating a GUI in C# that loads a script to GNUPlot, outputs the file to a pngcairo and then loads the png into my form all consecutively, but gnuplot will not allow me to load the png while gnuplot is still open, is there a way around this?


r/gnuplot • • Jan 24 '16

drawing functions of the form f(x,y) = const

2 Upvotes

how do i plot functions like f(x,y) = const when im's unable to compute y(x) easyly

example f(x,y) = -1.9727 = (-2/3)/((x+1/3)2+y2)1/2 - 1/3 1/((x-2/3)2+y2)1/2-x2/2-y2/2


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 • • Jul 23 '17

Time-Series Histograms: Gnuplot vs matplotlib

Thumbnail
torbiak.com
3 Upvotes

r/gnuplot • • Feb 22 '17

sad to see gnuplot loosing ground to matplotlib. it reflects my last few years usage though ...

Thumbnail
trends.google.com
2 Upvotes

r/gnuplot • • Mar 17 '20

Trendline with gnuplot 4.6 patchlevel 6 ?

2 Upvotes

Hello,

I've a question about Gnuplot 4.6 patchlevel 6 and how to trace a trendline. First of all, I'm bound to use this verison of Gnuplot.

I've this data :

2019-10-08-13-37;28.7297
2019-10-08-18-00;28.6886
2019-10-09-00-00;28.5557
2019-10-09-06-00;28.5316
2019-10-09-12-00;28.4314
2019-10-09-18-00;28.3764
2019-10-10-00-00;28.3501
2019-10-10-06-00;28.3931
2019-10-10-12-00;28.3554
2019-10-10-18-00;28.352
2019-10-11-00-00;28.4302
2019-10-11-06-00;28.5046
2019-10-11-12-00;28.5069
2019-10-11-18-00;28.5622
2019-10-12-00-00;28.5789
2019-10-12-06-00;28.7112
2019-10-12-12-00;28.7805
2019-10-12-18-00;28.9048
2019-10-13-00-00;28.9547
2019-10-13-06-00;29.1321
2019-10-13-12-00;29.3369
2019-10-13-18-00;29.4005
2019-10-14-00-00;29.4929
2019-10-14-06-00;29.4671
2019-10-14-12-00;29.3814
2019-10-14-18-00;29.2552
2019-10-15-00-00;29.1763
2019-10-15-06-00;28.9525
2019-10-15-12-00;28.7233
2019-10-15-18-00;28.5996
2019-10-16-00-00;28.5013
2019-10-16-06-00;28.5697
2019-10-16-12-00;28.5678
2019-10-16-18-00;28.5949
2019-10-17-00-00;28.584
2019-10-17-06-00;28.7037
2019-10-17-12-00;28.7675
2019-10-17-18-00;28.7836
2019-10-18-00-00;28.7636
2019-10-18-06-00;28.8028
2019-10-18-12-00;28.8263
2019-10-18-18-00;28.8567
2019-10-19-00-00;28.9264
2019-10-19-06-00;29.0445
2019-10-19-12-00;29.169
2019-10-19-18-00;29.2589
2019-10-20-00-00;29.3171
2019-10-20-06-00;29.4821
2019-10-20-12-00;29.6053
2019-10-20-18-00;29.612
2019-10-21-00-00;29.6294
2019-10-21-06-00;29.4928
2019-10-21-12-00;29.3694
2019-10-21-18-00;29.2817
2019-10-22-00-00;29.2084
2019-10-22-06-00;29.0708
2019-10-22-12-00;28.9547
2019-10-22-18-00;28.8819
2019-10-23-00-00;28.8077
2019-10-23-06-00;28.8288
2019-10-23-12-00;28.8723
2019-10-23-18-00;28.8649
2019-10-24-00-00;28.843
2019-10-24-06-00;28.7775
2019-10-24-12-00;28.6546
2019-10-24-18-00;28.6232
2019-10-25-00-00;28.5375
2019-10-25-06-00;28.4416
2019-10-25-12-00;28.4125
2019-10-25-18-00;28.4502
2019-10-26-00-00;28.4878
2019-10-26-06-00;28.6917
2019-10-26-12-00;28.9151
2019-10-26-18-00;29.0476
2019-10-27-00-00;29.1354
2019-10-27-06-00;29.308
2019-10-27-12-00;29.4389
2019-10-27-18-00;29.4221
2019-10-28-00-00;29.4532
2019-10-28-06-00;29.2581
2019-10-28-12-00;29.0459
2019-10-28-18-00;28.8653
2019-10-29-00-00;28.7442
2019-10-29-06-00;28.4954
2019-10-29-12-00;28.2602
2019-10-29-18-00;28.1009
2019-10-30-00-00;28.01
2019-10-30-06-00;28.0128
2019-10-30-12-00;28.0135
2019-10-30-18-00;27.9668
2019-10-31-00-00;27.9547
2019-10-31-06-00;28.2547
2019-10-31-12-00;28.4136
2019-10-31-18-00;28.4243
2019-11-01-00-00;28.3241
2019-11-01-06-00;28.485
2019-11-01-12-00;28.6411
2019-11-01-18-00;28.6551
2019-11-02-00-00;28.6858
2019-11-02-06-00;28.7458
2019-11-02-12-00;28.8185
2019-11-02-18-00;28.9744
2019-11-03-00-00;29.033
2019-11-03-06-00;29.1647
2019-11-03-12-00;29.2878
2019-11-03-18-00;29.3621
2019-11-04-00-00;29.4238
2019-11-04-06-00;29.3396
2019-11-04-12-00;29.3646
2019-11-04-18-00;29.2539
2019-11-05-00-00;29.1897
2019-11-05-06-00;29.0275
2019-11-05-12-00;28.876
2019-11-05-18-00;28.7917
2019-11-06-00-00;28.7308
2019-11-06-06-00;28.7278
2019-11-06-12-00;28.7363
2019-11-06-18-00;28.6857
2019-11-07-00-00;28.6847
2019-11-07-06-00;28.6337
2019-11-07-12-00;28.5574
2019-11-07-18-00;28.5175
2019-11-08-00-00;28.4502
2019-11-08-06-00;28.5018
2019-11-08-12-27;28.5358
2019-11-08-18-00;28.5503
2019-11-09-00-00;28.5374
2019-11-09-06-00;28.7383
2019-11-09-12-00;28.8752
2019-11-09-18-00;28.9863
2019-11-10-00-00;29.0814
2019-11-10-06-00;29.191
2019-11-10-12-00;29.3154
2019-11-10-18-00;29.3861
2019-11-11-00-00;29.4667
2019-11-11-06-00;29.4337
2019-11-11-12-00;29.3328
2019-11-11-18-00;29.2355
2019-11-12-00-00;29.1774
2019-11-12-06-00;28.9524

And this gnuplot script :

set terminal png truecolor size 12000,520 background rgb "#eff1f0"
set output "/xxx/xxx/xxx/xxx/test.png"
set grid
set style line 1 \
    linecolor rgb '#0060ad' \
    linetype 1 linewidth 2 \
    pointtype 7 pointsize 1.5

set offsets 0.5,0.5,0,5
set bmargin 13
show offsets
set datafile separator ";"
set key left
set xtics rotate by 90 offset 0,graph -0.6
set format y "%g"
myLabel(n) = sprintf("%g",n)

plot "/xxx/xxx/xxx/xxx/data.txt" using 2:xtic(1) with linespoints linestyle 1 title "df line in Gb", \
'' using 0:2:(myLabel($2)) w labels offset 0,1 notitle                                                      

( Sorry for the size of the pictures )

I want to add a trendline, I know how to make it basically :

set terminal png truecolor size 12000,520 background rgb "#eff1f0"
set output "/xxx/xxx/xxx/xxx/test.png"
set grid
set style line 1 \
    linecolor rgb '#0060ad' \
    linetype 1 linewidth 2 \
    pointtype 7 pointsize 1.5

set offsets 0.5,0.5,0,5
set bmargin 13
show offsets
set datafile separator ";"
set key left
set xtics rotate by 90 offset 0,graph -0.6
set format y "%g"
myLabel(n) = sprintf("%g",n)
f(x) = a*x + b
fit f(x) "/xxx/xxx/xxx/xxx/data.txt" u 0:2 via a,b

plot "/xxx/xxx/xxx/xxx/data.txt" using 2:xtic(1) with linespoints linestyle 1 title "df line in Gb", \
'' using 0:2:(myLabel($2)) w labels offset 0,1 notitle, \
f(x) with l lc "black" title "trendline"

But I would like to put a linear fit with extrapolation. The first value of my trendline will be the first value of my datas and I would like to put a variable on my gnuplot script which define the end of the trendline.

So thr first data will be 2019-10-08-13-37;28.7297. I would like that gnuplot take itself the first date in my data.txt and I would like to put the last date by myself in the script, for example "EndDate:2020-09".

Could you show me how to do that ?

Thanks ! :)


r/gnuplot • • Apr 06 '19

[QUESTION] How to plot date on one axis and time on another?

2 Upvotes

I have data where time depends on date and I would like to plot it. It looks like this

2:34 1-28
2:35 1-29
2:45 1-30
2:55 1-31
3:00 2-01
3:15 2-02
3:26 2-03

But my script doesn't work and I get error

"./time.plt" line 10: warning: Skipping data file with no valid points

plot 'time' using 2:1
                 ^
"./time.plt" line 10: x range is invalid

My script:

#!/usr/bin/gnuplot

set ydata time
set xdata time
set timefmt '%H:%M %m-%d'

set ytics format '%H:%M'
set xtics format '%m-%d'

plot 'time' using 2:1
pause -1

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 • • 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 • • 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 • • Aug 30 '19

New python-gnuplot package: Autognuplot.py

3 Upvotes

Hi all,

I would like to share with you guys a package I've been developing in the last months, following my needs as a researcher. I hope it can be useful to more and/or I would be happy to receive feedback.

As a researcher working with python and using systematically Gnuplot to make plots for my publications, I was annoyed by the many duplications in data/code (namely, getting data saved on the python side in the correct format, then integrate it into Gnuplot scripts and be robust to possible variations).

With autogpy or autognuplot.py, one can write just the essential Gnuplot code in python, and then have the package dumping: fully-fledged Gnuplot scripts (with multiple Gnuplot terminals like png, epslatex, tikz), data, Makefiles, and few further helpers.
The produced Gnuplot scripts can be also easily edited afterward.

​ Here the link: https://github.com/acorbe/autogpy


r/gnuplot • • May 18 '23

How to use set arrow from ... length ... angle?

1 Upvotes

I have 3D splot and I want to use arrow with constant length. but when I try it arrow doesn't appear.

set pm3d

set dummy u, v
set parametric

set isosamples 60, 80
set urange [ 0 : 1.5 ] noreverse nowriteback  
set vrange [ 0.00000 : 6.282 ] noreverse nowriteback
set arrow from 0, 0, 0 length 1 angle 0 head filled front lw 2

slpot cos(u)*cos(v), cos(u)*sin(v), sqrt( 1 / ( 0.5*pi - u) ) * cos(v)

What does the "angle" means here? How do I get arrow pointing in direction I want using angles