#] #] ********************* #] "$d_SysMaint"'graphs, plots/0_gnuplot notes.txt' - ??? # www.BillHowell.ca 30Jul2020 initial # view in text editor, using constant-width font (eg courier), tabWidth = 3 "$d_webRawe""System_maintenance/graphs, plots/0_gnuplot notes.txt" www.BillHowell.ca 10Jul2020 initial LibreOffice Calc sucks for >1000 datapoints - [slows, locks up, crashes] I'm sick & tired of GUI shit, want command line # 31Jul2022 now 111 colors!! see : "$d_SysMaint"'graphs, plots/1_gnuplot predefined color list.txt' Form with [default, example] formats : "$d_webRawe""Forms/0_form gnuplot.plt" https://raymii.org/s/tutorials/GNUplot_tips_for_nice_looking_charts_from_a_CSV_file.html Cool stuff - fis in set term expron to change font size in later text, example : set title "{/*1.2Fig 0.01 Price of consumables in England 1201-1993}" font "Helvetica:Bold=32" the font "Hel..." doesn't work, but the resize does, which is very handy to change forground color for painting (missing [fore, back]ground color selection tool!!??? : use a temporary imported image layer with multimple basic colors -> pick then paint https://www.shutterstock.com/image-vector/abstract-colored-palette-guide-132669530 /media/bill/Dell2/Website - raw/System_maintenance/graphs, plots/shutterstock.m color palette #48************************************************48 #24************************24 # Table of Contents, generate with : # $ grep "^#]" "$d_SysMaint"'graphs, plots/0_gnuplot notes.txt' | sed "s/^#\]/ /" # ********************* "$d_SysMaint"'graphs, plots/0_gnuplot notes.txt' - ??? 24May2021 search "gnuplot and how do I set dashed lines?" 25Mar2021 search "gnuplot and how do I use multiple y axis?" 31Jan2021 search "gnuplot and how to color an area" 07Jan2021 search "gnuplot and how do I change font size?" 07Jan2021 search "gnuplot and date formats" 29Dec2020 search "gnuplot and key columnhead" 20Sep2020 search "gnuplot and how do I remove the title and labels?" 19Sep2020 search "gnuplot and what is the special character for a tab?" 15Sep2020 search "gnuplot and how do I plot a VERTICAL LINE?" 12Sep2020 search "http://lowrank.net/gnuplot/tics-e.html" 12SSep2020 transform the dates of the SP500 data to decimal years, convert to 83yr-detrended log 11Jul2020 To setup gnuplot scripts for each year of suicide. rather than bash, use : 10Jul2020 search "Linux gnuplot and how do I color lines?", other [line, setup] stuff #24************************24 # Setup, ToDos, #] columns are 1-indexed (start at 1, not zero) : '/media/bill/Dell2/Website - raw/economics, markets/SP500/historical DAX Jan1970-Jul2022 gnuplot.dat' using 1:2 w lp ls 100, \ #08********08 #] ??Dec2022 #08********08 #] ??Dec2022 #08********08 #] 09Dec2022 scatterplot setup +-----+ https://stackoverflow.com/questions/42368448/gnuplot-scatter-plot-and-density Gnuplot: Scatter plot and density Asked 5 years, 9 months ago Modified 4 months ago Viewed 11k times I have x- and y-data points representing a star cluster. I want to visualize the density using Gnuplot and its scatter function with overlapping points. I used the following commands: set style fill transparent solid 0.04 noborder set style circle radius 0.01 plot "data.dat" u 1:2 with circles lc rgb "red" Is that possible in Gnuplot? Any ideas? gnuplotscatter-plot asked Feb 21, 2017 at 13:20 Gilfoyle >> Howell HANDY!! +-----+ https://stackoverflow.com/questions/74740809/gnuplot-scatter-plot-selecting-data-on-range-of-value-in-3rd-column gnuplot scatter plot selecting data on range of value in 3rd Column There are (should be) many examples of filtering data with gnuplot here on StackOverflow, however, mostly combined with another issue. So, whenever I'm trying to search for a really good and clear example, it takes more time for searching than to simply write down the line. You definitely don't need awk! Attention: Filtered data will not be connected in a line plot. So, in case you want to plot connected filtered lines, e.g. with lines or with linespoints you need to prepend an extra line. I assume you have gnuplot>=5.0. For older gnuplot versions you can check this workaround. The following will plot column 1 versus column 2, but only if column 3 is in the range 11 to 19. set datafile missing NaN plot "myData.dat" u 1:($3>=11 && $3<=19 ? $2: NaN) w linespoints answered 10 hours ago theozh #08********08 #] 02Aug2022 gnuplot yDetrend after all changes loaddefs to create yDetrend gnuplot file : "$d_Qndfs"'economics, markets/' '220730 Puetz2011 detrended international indexes, gnuplot specs.ndf' 'PuetzUWS calc [time, price] fractals.ndf' #08********08 #] 21Jul2022 search "gnuplot bold text", unset, size +-----+ https://stackoverflow.com/questions/67970819/how-to-make-labels-and-title-bold-in-gnuplot Which gnuplot version and which terminal are you using? The following should work from gnuplot >=5.0.0 with wxt terminal. Code: ### bold labels and title reset set term wxt enhanced set title "{/:Bold My Title in bold}" set xlabel "{/:Bold my xlabel in bold}" set ylabel "{/:Bold my ylabel in bold}" plot x ### end of code user avatar theozh +-----+ http://gnuplot.sourceforge.net/docs_4.2/node338.html Unset Options set using the set command may be returned to their default state by issuing the corresponding unset command. Example: set xtics mirror rotate by -45 0,10,100 ... unset xtics +-----+ https://stackoverflow.com/questions/36598885/change-font-size-on-gnuplot change font size on gnuplot +--+ AD1: the correct way to set tics font size is set tics font "name{,}" eg. set tics font "Helvetica,10" AD2: set tics font resizes only the fonts of x-y axes. To resize all the fonts (eg. the title) use set terminal png size 1280, 480 font "Helvetica,30" (or any other fontname and/or size :o) ) answered Apr 19, 2016 at 6:59 user avatar Tom Solid +--+ To change fonts locally/inline, one can use (from the ps_guide.pdf of gnuplot): {/Helvetica m} # font change {/Helvetica=18 m} # font and size change {/=8 m} # size change {/*2 m} # relative size scaling answered Jun 27 at 11:11 user avatar Friedrich +-----+ https://www.systutorials.com/how-to-change-the-font-sizes-in-gnuplot/ How to change the font sizes in Gnuplot Posted on Mar 24, 2018 by Q A In QA Several methods are available for Gnuplot: Set the global fonts size for the terminal: set terminal enhanced font 'Verdana,10' Here, 10 is the font size. Set the key fonts: set key font ",10" Here, 10 is the font size. Set the fonts for labels of x- and y-axis: set xtics font "Verdana,10" Here, 10 is the font size. #08********08 #] 19Jul2022 search "gnuplot set label text color", tc lt 100 = set text color to that of line type 100 http://gnuplot.sourceforge.net/docs_4.2/node193.html `textcolor` may be abbreviated `tc`. `tc default` resets the text color to its default state. `tc lt ` sets the text color to that of line type . `tc ls ` sets the text color to that of line style . `tc palette z` selects a palette color corresponding to the label z position. `tc palette cb ` selects a color corresponding to on the colorbar. `tc palette fraction `, with 0<=val<=1, selects a color corresponding to the mapping [0:1] to grays/colors of the `palette`. My usage for stock mkt indexes : set label 1 " semi-log trendline = 10^{-61.648 + (0.032600*yrFrac)}" \ at graph 0.01, 0.95 textcolor lt 100 # tc lt 100 = set text color to that of line type 100 >> This must appear AFTER the line types are declared >> Nyet - color didn't work, even if label did 08*******08 #] 24May2021 search "gnuplot and how do I set dashed lines?" # 31Jul2022 now 111 colors!! see : "$d_SysMaint"'graphs, plots/1_gnuplot predefined color list.txt' set template to : # Howell's standard color scheme - can add more with spacialFeatureLines # $ show colornames - for a list of Linux standard colors set style line 100 lt 1 ps 0 lw 2 lc rgb "black" set style line 101 lt 1 ps 0 lw 2 lc rgb "dark-grey" set style line 102 lt 1 ps 0 lw 2 lc rgb "red" set style line 103 lt 1 ps 0 lw 2 lc rgb "dark-magenta" set style line 104 lt 1 ps 0 lw 2 lc rgb "dark-cyan" set style line 105 lt 1 ps 0 lw 2 lc rgb "pink" set style line 106 lt 1 ps 0 lw 2 lc rgb "dark-orange" set style line 107 lt 1 ps 0 lw 2 lc rgb "dark-yellow" set style line 108 lt 1 ps 0 lw 2 lc rgb "green" set style line 109 lt 1 ps 0 lw 2 lc rgb "magenta" set style line 110 lt 1 ps 0 lw 2 lc rgb "blue" set style line 111 lt 1 ps 0 lw 2 lc rgb "navy" set style line 112 lt 1 ps 0 lw 2 lc rgb "violet" # for dashed lines, http://lowrank.net/gnuplot/misc4-e.html - but only for the terminal? set style line 200 dt 4 ps 0 lw 2 lc rgb "black" set style line 201 dt 4 ps 0 lw 2 lc rgb "dark-grey" set style line 202 dt 4 ps 0 lw 2 lc rgb "red" set style line 203 dt 4 ps 0 lw 2 lc rgb "dark-magenta" set style line 204 dt 4 ps 0 lw 2 lc rgb "dark-cyan" set style line 205 dt 4 ps 0 lw 2 lc rgb "pink" set style line 206 dt 4 ps 0 lw 2 lc rgb "dark-orange" set style line 207 dt 4 ps 0 lw 2 lc rgb "dark-yellow" set style line 208 dt 4 ps 0 lw 2 lc rgb "green" set style line 209 dt 4 ps 0 lw 2 lc rgb "magenta" set style line 210 dt 4 ps 0 lw 2 lc rgb "blue" set style line 211 dt 4 ps 0 lw 2 lc rgb "navy" set style line 212 dt 4 ps 0 lw 2 lc rgb "violet" # example : 1:2 w lp ls 100 : # select data columns 1:2 # lt = line thickness (1 is normal) # lw = line width # lp = line between each successive point # ls 100 = line style 100 # ps 0 = point size (datapoint circle, triangle, etc) # dt 2 = dash type 2 +-----+ http://www.gnuplotting.org/tag/linespoints/ Join data points with non-continuous lines June 9th, 2010 | 11 Comments In Gnuplot exists no line style that can do this directly. But with a little trick it is very easy to achieve. Since Gnuplot 4.4. there exists the property pointinterval (see the documentation) in combination with the plotting style linespoints. This property plots not every single point, but only every second for a value of 2 and so on. But if we use the value -1 it tells Gnuplot to insert a little gap between the points and the line. The size of the gap can be set by the pointintervalbox property. set style line 1 lc rgb '#0060ad' lt 1 lw 2 pt 7 pi -1 ps 1.5 set pointintervalbox 3 We specify a point interval pi of -1 and a point size of 1.5, in addition we set the the gap to a point size of 3. Now we can plot our data with the linespoints style. plot 'plotting_data1.dat' with linespoints ls 1 Using the same data as in the first plot of the gnuplot basics tutorial Plotting data we will get Fig. 1 as a result. +-----+ https://stackoverflow.com/questions/19412382/gnuplot-line-types Starting with version 5.0 the following changes related to linetypes, dash patterns and line colors are introduced: A new dashtype parameter was introduced: To get the predefined dash patterns, use e.g. plot x dashtype 2 You can also specify custom dash patterns like plot x dashtype (3,5,10,5),\ 2*x dashtype '.-_' edited Feb 1 '15 at 8:52 answered Oct 17 '13 at 7:29 Christoph +-----+ 11May2021 http://lowrank.net/gnuplot/misc4-e.html from Joerg in Switzerland. Thanks ! Define the linetype by set linestyle command. If you are using gnuplot ver.4, use set style line instead. Here we use 4 line-types, those are the solid, dashed, dotted, and dot-dashed lines. The IDs of 1, 2, 3, and 6 are assigned for them in the postscript terminal. With those line-types, we use thick (width 3) and thin (width 1) lines for each of them. We get 8 line-kinds now. gnuplot> set term postscript eps enhanced gnuplot> set linestyle 1 lt 1 lw 1 gnuplot> set linestyle 2 lt 2 lw 1 gnuplot> set linestyle 3 lt 3 lw 1 08*******08 #] 25Mar2021 search "gnuplot and how do I use multiple y axis?" +-----+ https://stackoverflow.com/questions/27390317/how-to-plot-multiple-y-axes As andyras wrote, you can use the second y-axis if you only have two datasets. In this case, you also need to to set ytics nomirror # remove the tickmarks of the left ayis on the right side set y2tics # make the right y-axis 'visible' If you want to plot more than one dataset, I would suggest to use multiplot. You can overlay several independent plots and put a unique offset to the y-axis for each of them. However, you need to take care that the number of y-tics and y-tick positions is the same. Plot: enter image description here (I did not care about the key here, this still needs adjustment) Code: set multiplot set xrange[0:10] # We need place to the left, so make the left margin 30% of screen set lmargin screen 0.3 ##### first plot set ytics 0.4 set yrange[-1.2:1.2] set ylabel "Voltage" textcolor rgb "red" plot sin(x) ##### Second plot set ytics 1 set yrange[-3:3] set ytics offset -8, 0 set ylabel "Current" offset -8, 0 textcolor rgb "green" plot 3*cos(x) linecolor 2 ##### Third plot set ytics 0.5 set yrange[-1.5:1.5] set ytics offset -16, 0 set ylabel "Power" offset -16, 0 textcolor rgb "blue" plot 3*sin(x)*cos(x) linecolor 3 unset multiplot edited Dec 10 '14 at 12:42 answered Dec 10 '14 at 10:58 sweber +--+ Yes, you can have two y axes for free, e.g. plot x, x**2 axes x1y2 The axes specification lets you put things on x1y1, x2y1, etc. If you want more than two things plotted on the same y axes you have to normalize things yourself: plot 'data1.dat' using 1:($2/MAX_1), \ 'data2.dat' using 1:($2/MAX_2), \ 'data3.dat' using 1:($s/MAX_3) The variables MAX_X can be precalculated by using the stats command in gnuplot 4.6+, or you can put them in manually. answered Dec 9 '14 at 23:27 andyras 08*******08 #] 31Jan2021 search "gnuplot and how to color an area" lots of examples of coloring between two curves - rectangular areas should be easy but I don't see blogs +-----+ http://gnuplot.sourceforge.net/demo/rectangle.html # demo for the use of "set object rectangle" # Updated for version 5 # show front/back/behind, opaque key box set object 1 rect from 0,0 to 1,4 fc lt 2 front set object 2 rect from -1,1 to 0,5 fc rgb "gold" set object 5 rect from 0, -3 to 2, -2 fc rgb "cyan" fs pattern 1 bo -1 set style fill pattern 2 bo 1 # # Test clipping and placement in the presence of an inverted axis range # set obj 4 rect at -4,0 size 3,1 set label 4 at -2.6,0 "There should be a\nclipped rectangle here" left offset 0,.5 # # The key box has its own option "opaque" to generate a filled rectangle # set key box opaque height 2 # # Illustrate using character widths to put a box around a label # LABEL = "Label in a box" set obj 10 rect at -3,-4 size char strlen(LABEL), char 1 set obj 10 fillstyle empty border -1 front set label 10 at -3,-4 LABEL front center set obj 9 rect from -4, -4 to -4, -3 fc lt -1 set obj 20 rect from graph 0, graph 0 to graph 1, graph 1 fs solid 0.15 fc rgb "#FFD700" behind set xrange [5:-5] plot x, -3+sin(x*5)/x lt 3 lw 3 08*******08 #] 07Jan2021 search "gnuplot and how do I change font size?" +-----+ https://stackoverflow.com/questions/36598885/change-font-size-on-gnuplot AD1: the correct way to set tics font size is set tics font "name{,}" eg. set tics font "Helvetica,10" AD2: set tics font resizes only the fonts of x-y axes. To resize all the fonts (eg. the title) use set terminal png size 1280, 480 font "Helvetica,30" (or any other fontname and/or size :o) ) answered Apr 19 '16 at 6:59 Tom Solid +--+ https://sourceforge.net/p/gnuplot/discussion/5925/thread/9a104bab/ Hans-Bernhard Broeker - 2005-07-21 I already told you: the key font is whatever you specified as the font directly in 'set term postscript'. I have no idea how 'help enhanced' could fail to teach you how to change font and size from inside any string output by gnuplot. It even has examples doing exactly that! Laura - 2005-07-25 Ok, I understand now that you have to type {/*0.75 text} if you want your text to be 75% of it original size. I just thought that there would be a simpler way to change the size of the font's key rather than going though and putting {/*75 text} for each one of my individual titles. There should be a set key font command. My next problem is that I want to make the font of the key smaller in a histogram, using autotitles. How would I do that? 08*******08 #] 07Jan2021 search "gnuplot and date formats" https://stackoverflow.com/questions/22896632/how-to-set-the-current-date-in-the-gnuplot-title Use strftime and time(0) to add a time/data to your title, e.g.: set title "data of execution ".strftime("%a %b %d %H:%M:%S %Y", time(0)) Alternatively, if it doesn't have to be in the title you can also use set timestamp answered Apr 6 '14 at 17:07 Christoph http://lowrank.net/gnuplot/datetime-e.html data timefmt comment 2004/4/6 %Y/%m/%d 2004/04/06 works well December/96 %B/%y warning if mis-spelled 2004/Jan %Y/%b 3-letters abbreviation 1970/240 %Y/%j "%j" is a day of the year (1-365) 02:45:03 %H:%M:%S "%H", 24-hour 1076909172 %s seconts since 1/1/1970 00:00 08*******08 #] 29Dec2020 search "gnuplot and key columnhead" +-----+ http://gnuplot.sourceforge.net/demo/datastrings.html # # Demonstrate features of datastrings patch # Ethan A Merritt # 08-Mar-2003 # # # Illustrate reading plot labels from column head in datafile # set title "Auto-labeling plots from text fields in datafile" set label 1 "Generate plot labels from first row in each column" set label 1 at graph 0.02, 0.85 tc lt 3 set label 2 "Generate x-axis labels from first column in each row" set label 2 at graph 0.02, 0.80 tc lt 3 set style data linespoints set ylabel "mm" set yrange [0:200] # # # Illustrate reading xtic axis labels from the datafile # set title "Read tic labels from a datafile column\nAn approximation of Hans Olav Eggestad's categoric plot patch\nusing 'using ($0):2:xticlabels(1)' and 'set style fill solid border -1'" set boxwidth 0.3 set style fill solid 1.000000 border -1 set bmargin 3 set pointsize 2 set yrange [0:180] set xrange [-0.5:11.5] set ylabel "mm" set tics scale 0.0 set grid y set xtics # set key autotitle columnhead plot 'ctg-y2.dat' using ($0-0.2):2 index 0 with boxes title "precipitation 1992-2000", \ '' using ($0+0.2):2 index 1 with boxes title " 2000-2001", \ '' using ($0):2 index 2 with linespoints lw 3 title "runoff 1992-2000", \ '' using ($0):2:xticlabels(1) index 3 with linespoints lw 3 title " 2000-2001" # +-----+ >> Howell's example, from "$d_webRawe""Projects - mini/Puetz & Borchardt/Puetz UWS regular and double model for SP500 1870-2030 non-fitted.plt" : # Howell's standard color scheme - can add more with spacialFeatureLines set style line 100 ps 0 lw 1 lt rgb "black" # normal thin line, black set style line 101 ps 0 lw 1 lt rgb "red" # normal thin line, red set style line 102 ps 0 lw 1 lt rgb "blue" # normal thin line, blue set style line 103 ps 0 lw 1 lt rgb "black" # normal thin line, black # specialFeatureLines are added here. examples : # set arrow from 1926.25,0.2 to 1926.25,5.0 nohead linecolor "blue" plot \ '/media/bill/SWAPPER/Website - raw/Projects - mini/Puetz & Borchardt/Puetz UWS model for SP500 1870-2030 non-fitted.dat' using 1:2 with lp ls 100 title "UWS regular cycles", \ '/media/bill/SWAPPER/Website - raw/Projects - mini/Puetz & Borchardt/Puetz DUWS model for SP500 1870-2030 non-fitted.dat' using 1:2 with lp ls 102 title "UWS double cycles" ******** #] 20Sep2020 search "gnuplot and how do I remove the title and labels?" +-----+ https://stackoverflow.com/questions/50270580/how-to-remove-labels-and-arrows-to-the-next-plot-in-script labels and arrows stay in every subsequent plot until you explicitly remove them, like practically all gnuplot settings. You can find out the identifier number of each of them with "show label" / "show arrow" and remove them via "unset". set label 5 at 1,1 "Labeltext" # explicitly give the label an id plot x # here's a label unset label 5 plot x # and it's gone answered May 10 '18 at 13:46 Karl ******** #] 19Sep2020 search "gnuplot and what is the special character for a tab?" +-----+ http://www.bersch.net/gnuplot-doc/enhanced-text-mode.html You can specify special symbols numerically by giving a character code in octal, e.g. {/Symbol \245} is the symbol for infinity in the Adobe Symbol font. This does not work for multibyte encodings like UTF-8, however. In a UTF-8 environment, you should be able to enter multibyte sequences implicitly by typing or otherwise selecting the character you want. >> shows [[super, sub]-scripts, space of lenth, overprints, etc] >> functions [bezier, Acsplines, fNormal, etc] >> tab char decimal 9 -> octal 11 -> {/Symbol \11} ******** #] 15Sep2020 search "gnuplot and how do I plot a VERTICAL LINE?" https://stackoverflow.com/questions/4457046/how-do-i-draw-a-set-of-vertical-lines-in-gnuplot From the Gnuplot documentation. To draw a vertical line from the bottom to the top of the graph at x=3, use: set arrow from 3, graph 0 to 3, graph 1 nohead answered Feb 24 '16 at 21:53 Nicholas ******** #] 12Sep2020 search "http://lowrank.net/gnuplot/tics-e.html" http://lowrank.net/gnuplot/tics-e.html set format y "10^{%L}" The formats, 't', 'l', 'T', and 'L' are related to log-scale plot. Let's draw a function y=exp(-x)+exp(x) in the X range of [-10:10]. Firstly this function is shown in a non-log scale. In order to compare those formats, the tics are shown in three formats at the same time. gnuplot> set format y "%T %t %g" gnuplot> plot exp(-x)+exp(x) gnuplot> set logscale y gnuplot> replot +--+ http://gnuplot.sourceforge.net/docs_4.2/node197.html To enable log scaling in both x and z axes: set logscale xz To enable scaling log base 2 of the y axis: set logscale y 2 To enable z and color log axes for a pm3d plot: set logscale zcb To disable z axis log scaling: unset logscale z search "gnuplot and how do I specify the tick marks?" http://lowrank.net/gnuplot/tics-e.html #] It is possible to place an arbitrary text at the tics position instead of the numbers. you can write "April", "May", "June", and "July" at the positions X=1,2,3, and 4, by the following way. #] gnuplot> set xtics ("April" 1, "May" 2, "June" 3, "July" 4) #] gnuplot> plot "test.dat" using 1:2:3 notitle with boxes, "test.dat" using 1:2 notitle with lines # xtics is VERY sensitive! 3.153e8 - 3.157e8 makes a difference!!! # best so far is 3.1555e8 set xtics 3.1555e8 # WOW! insane fudge to get the right tickmarks!!??!! # /media/bill/SWAPPER/Projects - mini/El Nino SO/1951-2020 El Nino versus SP500 gnuplot script.plt # "$d_bin""gnuplot.sh" runs this gnuplot script # www.BillHowell.ca 16:21 initial - doesn't work, just use gimp & transparencies! +-----+ #] 12SSep2020 transform the dates of the SP500 data to decimal years, convert to 83yr-detrended log /media/bill/SWAPPER/Projects - mini/El Nino SO/SP500 data 1928-2020 yahoo finance, 83yr-detrended log.ods ******** #] 11Jul2020 To setup gnuplot scripts for each year of suicide. rather than bash, use : 'link d_QNial_mine 'readDataFile fixed cols.ndf' *********** #] 10Jul2020 search "Linux gnuplot and how do I color lines?", other [line, setup] stuff http://gnuplot.info/ http://gnuplot.info/demo search "Linux gnuplot and how do I color lines?" https://www.linuxquestions.org/questions/linux-newbie-8/how-to-color-different-lines-in-gnuplot-4175533448/ >> great example for when I'm at a more advanced level https://raymii.org/s/tutorials/GNUplot_tips_for_nice_looking_charts_from_a_CSV_file.html >> EXCELLENT reference to grow with!!!! +--+ set style line 101 lw 3 lt rgb "#f62aa0" # style for targetValue (1) (pink) set style line 102 lw 3 lt rgb "#26dfd0" # style for measuredValue (2) (light blue) set style line 103 lw 4 lt rgb "#b8ee30" # style for secondYAxisValue (3) (limegreen) plot filename using 1:2 with lines ls 101, '' using 1:3 with lines ls 102, '' using 1:4 with lines axis x1y2 ls 103 # new plotcommand +--+ >> much better! search "linux gnuplot : what is the maximum number of data points?" : https://stackoverflow.com/questions/49843425/what-is-the-max-number-of-data-points-for-gnuplot-and-how-can-it-be-changed >> one example >20k points +-----+ https://unix.stackexchange.com/questions/34440/automate-gnuplot-plotting-with-bash +--+ If I understand correctly, this is what you want: for FILE in *; do gnuplot <<- EOF set xlabel "Label" set ylabel "Label2" set title "Graph title" set term png set output "${FILE}.png" plot "${FILE}" using 1:2:3:4 with errorbars EOF done This assumes your files are all in the current directory. The above is a bash script that will generate your graphs. Personally, I usually write a gnuplot command file (call it, say, gnuplot_in), using a script of some form, with the above commands for each file and plot it using gnuplot < gnuplot_in. edited Jul 15 '16 at 16:27 PeaWagon 344 bronze badges answered Mar 18 '12 at 13:22 Wojtek +--+ Bash solution, using a temporary command file: echo > gnuplot.in for FILE in *; do echo "set xlabel \"Label\"" >> gnuplot.in echo "set ylabel \"Label2\"" >> gnuplot.in echo "set term png" >> gnuplot.in echo "set output \"${FILE}.png\" >> gnuplot.in echo "plot \"${FILE}\" using 1:2:3:4 with errorbars title \"Graph title\"" >> gnuplot.in done gnuplot gnuplot.in share improve this answer answered Mar 5 '16 at 3:00 rouble +-----+ https://www.unix.com/shell-programming-and-scripting/248568-gnuplot-bash.html Chubler_XL Forum Staff Moderator #!/usr/bin/gnuplot set terminal png font "helvetica" set output 'var_graph.png' # For pdf output (requires ps2pdf) replace with below # set terminal postscript landscape color # set output '| ps2pdf - var_usage.pdf' set title "Var filesystem usage over Time" set timestamp "Last updated: %m/%d/%Y, %H:%M" top set xlabel "Date (mm/yy)" set timefmt "%Y/%m/%d %H:%M" set xdata time set format x "%m/%Y" set ylabel "GB" set yrange [ 0 : ] set key left set grid set datafile separator "\t" show variables plot '/usr/lib/var_disk_data' using 1:2 t 'Used' with lines # "$d_SysMaint"'graphs, plots/0_gnuplot notes.txt' # enddoc