Hello, I would like to get the smoothed function, or its parameters, when plotting with the option smooth. I have found https://sourceforge.net/p/gnuplot/discussion/5925/thread/6abedffd/ but it refers to spline only and also it is an old post. In my case I use bezier smoothing. Thank you.
https://stackoverflow.com/questions/63689746/gnuplot-setting-line-style-in-a-for-loop propose a solution using linespoints and a smart modification of the parameters. It works with fine Version 5.0 patchlevel 0 last modified 2015-01-01 but not with Version 5.4 patchlevel 0 last modified 2020-07-13 (points never shown)
oh sorry for a misprint : the first not working line is plot sin(x) lc rgb "blue" lw "2" w @"a"
Thank you Hans-Bernhard Broeker for your explanation. Indeed a="linesp" plot sin(x) lc rgb "blue" lw "2" w @a works, but plot sin(x) lc rgb "blue" lw "2" w @a and plot sin(x) lc rgb "blue" lw "2" w @word(a,1) plot sin(x) lc rgb "blue" lw "2" w sprintf("@%s",word(a,1)) plot sin(x) lc rgb "blue" lw "2" w @sprintf("%s",word(a,1)) do not work. So how can I switch between line, point and linesp in a plot for loop the choice between the 3 possibilities being determined by a string (like the colors eg)...
Hello I have a file 'tmptst('with two data-sets and the following script cols = "red blue" styles = "linesp linesp" wids = "1 4" plot for [i=1:2] 'tmptst' i i-1 lc rgb word(cols,i) lw word(wids,i) wi linesp ti sprintf("%d",i) # OK plot for [i=1:2] 'tmptst' i i-1 lc rgb word(cols,i) lw word(wids,i) wi word(styles,i) ti sprintf("%d",i) # NON OK the first plot (line 4) is fine (title, color, style and width) are OK, but the second is not: " line 5: unrecognized plot type" What is wrong on line 5 ? Thank...
Thanks a lot, the script works fine now with the two version 5.0 and 5.2 !
Thank you for the fast answer dfBulk = 'set table $tab;\ plot "< closest.py Result_*_2_0.5_R1_NP 0.5843" usi (log($2)):(log($10*$2*$2));\ fit aB*x+bB $tab via aB,bB ; \ unset table;\ set logs; \ unset logs cb;\ set xlabel "L";set ylabel "bulk(L)";\ set title sprintf("Mass largest cluster, n=2, p=0.5, non periodic p_c=0.5843") ;\ set label 1 at 16,screen 0.8 left sprintf("regression slope= %f (exact value= %f, prec= %.2f%%) ",aB,d f2d,abs(aB-df2d)*100/df2d) ;\ plot "< closest.py Result_*_2_0.5_R1_NP...
same fit a table works in 5.0 and not in 5.2