Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3481 > unrolled thread
| Started by | Jean-Pierre Coulon <coulon@cacas.pam.obs-nice.fr> |
|---|---|
| First post | 2016-11-23 14:49 +0100 |
| Last post | 2016-11-24 10:00 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
Can I display tics to show the value of my paramter. Jean-Pierre Coulon <coulon@cacas.pam.obs-nice.fr> - 2016-11-23 14:49 +0100
Re: Can I display tics to show the value of my paramter. Karl Ratzsch <mail.kfr@gmx.net> - 2016-11-23 19:41 +0100
Re: Can I display tics to show the value of my paramter. Jean-Pierre Coulon <coulon@cacas.pam.obs-nice.fr> - 2016-11-24 09:16 +0100
Re: Can I display tics to show the value of my paramter. Karl Ratzsch <mail.kfr@gmx.net> - 2016-11-24 10:00 +0100
| From | Jean-Pierre Coulon <coulon@cacas.pam.obs-nice.fr> |
|---|---|
| Date | 2016-11-23 14:49 +0100 |
| Subject | Can I display tics to show the value of my paramter. |
| Message-ID | <alpine.WNT.2.20.1611231443210.9732@dhcp3-6> |
I a working with set param. If f is my dummy variable, can I display tics on the plot at f=1, f=10 etc? Each tic should by accompanied by the values 1, 10 etc. Regards, -- Jean-Pierre Coulon
[toc] | [next] | [standalone]
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Date | 2016-11-23 19:41 +0100 |
| Message-ID | <o14nsm$rqr$1@solani.org> |
| In reply to | #3481 |
Am 23.11.2016 um 14:49 schrieb Jean-Pierre Coulon:
> I a working with set param. If f is my dummy variable, can I display
> tics on the plot at f=1, f=10 etc? Each tic should by accompanied by
> the values 1, 10 etc.
Something like
set samp 30
x(f) = f/10 * sin(f/5)
y(f) = f/10 * cos(f/5)
plot sample [f=1:30] "+" \
using (x(f)):(y(f)):(sprintf("%.f",f)) with labels point pt 1
? The stable gp version does not (yet) have an individual increment
specifier for the sampling range. You can work around that with a
prefabricated named datablock (see "help inline data").
set table $samp1
set samp 50
set xr [1:50]
plot "+" us 1 with table
unset table
Now you have the numbers 1 to 50 in $samp1, which you can plat like
a normal ascii file.
[toc] | [prev] | [next] | [standalone]
| From | Jean-Pierre Coulon <coulon@cacas.pam.obs-nice.fr> |
|---|---|
| Date | 2016-11-24 09:16 +0100 |
| Message-ID | <alpine.WNT.2.20.1611240914540.9264@dhcp3-6> |
| In reply to | #3482 |
On Wed, 23 Nov 2016, Karl Ratzsch wrote:
> Something like
>
> set samp 30
>
> x(f) = f/10 * sin(f/5)
> y(f) = f/10 * cos(f/5)
>
> plot sample [f=1:30] "+" \
> using (x(f)):(y(f)):(sprintf("%.f",f)) with labels point pt 1
Thanks, this works but I want a logarithmic set of labels. I am happy like
this:
set sample 30
set trange [1:30]
x(f) = f/10 * sin(f/5)
y(f) = f/10 * cos(f/5)
set param
set dummy f
set label "10" at x(10), y(10)
set label "20" at x(20), y(20)
# etc.
plot x(f), y(f)
Bye,
--
Jean-Pierre Coulon
[toc] | [prev] | [next] | [standalone]
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Date | 2016-11-24 10:00 +0100 |
| Message-ID | <o16a7l$q8m$1@solani.org> |
| In reply to | #3483 |
Am 24.11.2016 um 09:16 schrieb Jean-Pierre Coulon:
> Thanks, this works but I want a logarithmic set of labels. I am
> happy like this:
>
> set sample 30
> set trange [1:30]
> x(f) = f/10 * sin(f/5)
> y(f) = f/10 * cos(f/5)
> set param
> set dummy f
> set label "10" at x(10), y(10)
> set label "20" at x(20), y(20)
> # etc.
> plot x(f), y(f)
set table $samp1
set samp 11
set xr [0:10]
plot "+" us (2**$1) with table notitle
unset table
plot $samp1 using (x($1)):(y($1)):(sprintf("%.f",$1)) \
with labels point pt 1
set samp 100
rep "+" using (x($1)):(y($1))
That way you don't use that crummy parametric mode, and don't have
to retype all your labels for every new plot.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web