setterminalpngtruecolorsize12000,520backgroundrgb"#eff1f0"setoutput"/xxx/xxx/xxx/xxx/test.png"setgridsetstyleline1 \
linecolorrgb'#0060ad' \
linetype1linewidth2 \
pointtype7pointsize1.5setoffsets0.5,0.5,0,5setbmargin13showoffsetssetdatafileseparator";"setkeyleftsetxticsrotateby90offset0,graph-0.6setformaty"%g"myLabel(n)=sprintf("%g",n)plot"/xxx/xxx/xxx/xxx/data.txt"using2:xtic(1)withlinespointslinestyle1title"df line in Gb", \
''using0:2:(myLabel($2))wlabelsoffset0,1notitle
( Sorry for the size of the pictures )
I want to add a trendline, I know how to make it basically :
setterminalpngtruecolorsize12000,520backgroundrgb"#eff1f0"setoutput"/xxx/xxx/xxx/xxx/test.png"setgridsetstyleline1 \
linecolorrgb'#0060ad' \
linetype1linewidth2 \
pointtype7pointsize1.5setoffsets0.5,0.5,0,5setbmargin13showoffsetssetdatafileseparator";"setkeyleftsetxticsrotateby90offset0,graph-0.6setformaty"%g"myLabel(n)=sprintf("%g",n)f(x)=a*x+bfitf(x)"/xxx/xxx/xxx/xxx/data.txt"u0:2viaa,bplot"/xxx/xxx/xxx/xxx/data.txt"using2:xtic(1)withlinespointslinestyle1title"df line in Gb", \
''using0:2:(myLabel($2))wlabelsoffset0,1notitle, \
f(x)withllc"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 ! :)
Last edit: Ezzmazz 2020-03-17
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For starters, please consider updating; 4.6pl6 is five years behind, and people have largely forgotten about aspects of such old versions, particularly those which would usually be done quite differently in current gnuplot.
As to the issue itself, before you can start selecting by date, you should probably just start actually using the time/date column at all. Right now, you're completely skipping it. It might just as well not be in the file in the first place.
So read up on "help time/date" and the nodes it links to to learn how those 75 % of the text in your file that currently just occupy space can be put to use.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 :
And this gnuplot script :
( Sorry for the size of the pictures )
I want to add a trendline, I know how to make it basically :
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 ! :)
Last edit: Ezzmazz 2020-03-17
For starters, please consider updating; 4.6pl6 is five years behind, and people have largely forgotten about aspects of such old versions, particularly those which would usually be done quite differently in current gnuplot.
As to the issue itself, before you can start selecting by date, you should probably just start actually using the time/date column at all. Right now, you're completely skipping it. It might just as well not be in the file in the first place.
So read up on "help time/date" and the nodes it links to to learn how those 75 % of the text in your file that currently just occupy space can be put to use.