how to plot power trendline showing equation and regression coefficient (like in the image below) in gnuplot? -


i trying recreate plot created in ms excel using gnuplot. can done in gnuplot shows power trendline equation corresponding regression coefficient? data has plotted file:'data.txt' , data 'x' column 10 , 'y' column 11. thanks!

power trendline

i managed produce working version of above excel figure. improvement highly appreciated. thanks. code in gnuplot

      set terminal svg enhanced fname "times-new-roman,12"       set xlabel "x"       set ylabel "y"       set xrange [0:*]       set yrange [0:*]        set format x "%0.3f"        set format y '%0.3f'       set title sprintf("y=f(x)")        # plot       filename="data.txt"       plotfile="out.svg"       set output plotfile       f(x)=a*x**b       fit f(x) filename using 10:11 via a,b       set label gpfun_f @ graph .15,.95       set label sprintf("a = %g",a) @ graph .15,.90       set label sprintf("b = %g",b) @ graph .15,.85       plot filename using 10:11 title "y(x)" points pointtype 1 pointsize 1,\   f(x) title "power-trendline" line linewidth 2 

![power-trendline-gnuplot] enter image description here


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -