Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #1064 > unrolled thread
| Started by | TonyG <tgozdz@gmail.com> |
|---|---|
| First post | 2012-04-30 05:47 -0700 |
| Last post | 2012-05-31 14:50 -0700 |
| Articles | 5 — 3 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
display the fit function and/or fit parameters in the chart area? TonyG <tgozdz@gmail.com> - 2012-04-30 05:47 -0700
Re: display the fit function and/or fit parameters in the chart area? TonyG <tgozdz@gmail.com> - 2012-05-10 20:27 -0700
Re: display the fit function and/or fit parameters in the chart area? Nicholas Musolino <n.musolino@gmail.com> - 2012-05-20 18:38 -0700
Re: display the fit function and/or fit parameters in the chart area? sfeam <sfeam@users.sourceforge.net> - 2012-05-20 21:42 -0700
Re: display the fit function and/or fit parameters in the chart area? TonyG <tgozdz@gmail.com> - 2012-05-31 14:50 -0700
| From | TonyG <tgozdz@gmail.com> |
|---|---|
| Date | 2012-04-30 05:47 -0700 |
| Subject | display the fit function and/or fit parameters in the chart area? |
| Message-ID | <29384440.3636.1335790067323.JavaMail.geo-discussion-forums@vbbfk16> |
How to automate the process, instead of having to insert copied strings?
[toc] | [next] | [standalone]
| From | TonyG <tgozdz@gmail.com> |
|---|---|
| Date | 2012-05-10 20:27 -0700 |
| Message-ID | <18741148.475.1336706854974.JavaMail.geo-discussion-forums@vbq19> |
| In reply to | #1064 |
On Monday, April 30, 2012 8:47:47 AM UTC-4, TonyG wrote: > How to automate the process, instead of having to insert copied strings? Is it possible...? So far, no peep from anybody...
[toc] | [prev] | [next] | [standalone]
| From | Nicholas Musolino <n.musolino@gmail.com> |
|---|---|
| Date | 2012-05-20 18:38 -0700 |
| Message-ID | <10fad3e4-1d89-4c17-b03a-6dac787ef47a@pr7g2000pbb.googlegroups.com> |
| In reply to | #1095 |
On May 10, 11:27 pm, TonyG <tgo...@gmail.com> wrote: > On Monday, April 30, 2012 8:47:47 AM UTC-4, TonyG wrote: > > How to automate the process, instead of having to insert copied strings? > > Is it possible...? So far, no peep from anybody... See second item on this page. http://t16web.lanl.gov/Kawano/gnuplot/misc4-e.html Copied and pasted from that site: gnuplot> f(x)=a*x*x+b*x+c gnuplot> fit f(x) 'test.dat' using 1:2:3 via a,b,c gnuplot> set label 1 "Y=AX^2+BX+C" at 11,1225 gnuplot> set label 2 "A = %g", a at 12,1200 gnuplot> set label 3 "B = %g", b at 12,1180 gnuplot> set label 4 "C = %g", c at 12,1160 gnuplot> plot f(x),'test.dat' using 1:2:3 with yerr
[toc] | [prev] | [next] | [standalone]
| From | sfeam <sfeam@users.sourceforge.net> |
|---|---|
| Date | 2012-05-20 21:42 -0700 |
| Message-ID | <jpch3q$ase$1@dont-email.me> |
| In reply to | #1132 |
Nicholas Musolino wrote:
> On May 10, 11:27 pm, TonyG <tgo...@gmail.com> wrote:
>> On Monday, April 30, 2012 8:47:47 AM UTC-4, TonyG wrote:
>> > How to automate the process, instead of having to insert copied
>> > strings?
>>
>> Is it possible...? So far, no peep from anybody...
>
> See second item on this page.
> http://t16web.lanl.gov/Kawano/gnuplot/misc4-e.html
>
> Copied and pasted from that site:
>
> gnuplot> f(x)=a*x*x+b*x+c
> gnuplot> fit f(x) 'test.dat' using 1:2:3 via a,b,c
> gnuplot> set label 1 "Y=AX^2+BX+C" at 11,1225
> gnuplot> set label 2 "A = %g", a at 12,1200
> gnuplot> set label 3 "B = %g", b at 12,1180
> gnuplot> set label 4 "C = %g", c at 12,1160
> gnuplot> plot f(x),'test.dat' using 1:2:3 with yerr
That syntax is very out of date. I'm not sure it will work any more.
Use string variables and string functions instead.
That is, instead of
set label 2 "A = %g", a at 12,1200
you want
set label 2 sprintf("A = %4.2f",a) at 12, 1200
and so on.
Ethan
[toc] | [prev] | [next] | [standalone]
| From | TonyG <tgozdz@gmail.com> |
|---|---|
| Date | 2012-05-31 14:50 -0700 |
| Message-ID | <6cc77d4f-6a86-4885-9375-426e202b0e76@googlegroups.com> |
| In reply to | #1133 |
On Monday, May 21, 2012 12:42:34 AM UTC-4, sfeam wrote:
> Nicholas Musolino wrote:
>
> > On May 10, 11:27 pm, TonyG <tgo...@gmail.com> wrote:
> >> On Monday, April 30, 2012 8:47:47 AM UTC-4, TonyG wrote:
> >> > How to automate the process, instead of having to insert copied
> >> > strings?
> >>
> >> Is it possible...? So far, no peep from anybody...
> >
> > See second item on this page.
> > http://t16web.lanl.gov/Kawano/gnuplot/misc4-e.html
> >
> > Copied and pasted from that site:
> >
> > gnuplot> f(x)=a*x*x+b*x+c
> > gnuplot> fit f(x) 'test.dat' using 1:2:3 via a,b,c
> > gnuplot> set label 1 "Y=AX^2+BX+C" at 11,1225
> > gnuplot> set label 2 "A = %g", a at 12,1200
> > gnuplot> set label 3 "B = %g", b at 12,1180
> > gnuplot> set label 4 "C = %g", c at 12,1160
> > gnuplot> plot f(x),'test.dat' using 1:2:3 with yerr
>
>
> That syntax is very out of date. I'm not sure it will work any more.
> Use string variables and string functions instead.
> That is, instead of
> set label 2 "A = %g", a at 12,1200
> you want
> set label 2 sprintf("A = %4.2f",a) at 12, 1200
>
> and so on.
>
> Ethan
Ethan,
This is a very helpful hint; thank you.
I found a few more details at http://softsolder.com/2009/06/02/displaing-variables-in-gnuplot/
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web