Discussion:
[Gnuplot-info] How to draw a line on pm3d map?
Matusevita, IĮ
2010-03-01 09:51:19 UTC
Permalink
Hello,

I would like to draw some simple lines/curves on the pm3d map. I need
to do this quickly and qualitatively.

The best what I can do is the result of this script:

# I need to generate figure with LaTeX labels
set terminal epslatex color
set output "Fig.tex"
unset origin
# So I draw a pm3d map...
set multiplot
set pm3d map
set palette negative
set size square
set xlabel "$\\gamma_1$"
set ylabel "$\\gamma_2$"
unset key
splot [-50:50][-50:50] x
# ...and then I draw one line on the pm3d map
unset pm3d
unset xlabel
unset ylabel
set size square 0.6999999999999999999
set origin 0.11345, 0.12894
set style line 1 lt 2 lc rgb "black" lw 2
plot [-50:50][-50:50] 3.42366-x ls 1
unset size
unset origin
unset multiplot

As one can see, the result is not good because it is difficult to put
the figure with line on the pm3d map accurately.

May be someone knows the better way to solve my problem?

Thank you in advance.

Aris M.
Thomas Sefzick
2010-03-01 10:40:28 UTC
Permalink
reset
set parametric
set view map
set palette negative
set size square
set xrange [-50:50]
set yrange [-50:50]
set urange [-50:50]
set vrange [-50:50]
set style line 1 lt 2 lc rgb "black" lw 2
splot u,v,u with pm3d, u,3.42366-u,0 ls 1
Post by Matusevita, IÄ®
Hello,
I would like to draw some simple lines/curves on the pm3d map. I need
to do this quickly and qualitatively.
# I need to generate figure with LaTeX labels
set terminal epslatex color
set output "Fig.tex"
unset origin
# So I draw a pm3d map...
set multiplot
set pm3d map
set palette negative
set size square
set xlabel "$\\gamma_1$"
set ylabel "$\\gamma_2$"
unset key
splot [-50:50][-50:50] x
# ...and then I draw one line on the pm3d map
unset pm3d
unset xlabel
unset ylabel
set size square 0.6999999999999999999
set origin 0.11345, 0.12894
set style line 1 lt 2 lc rgb "black" lw 2
plot [-50:50][-50:50] 3.42366-x ls 1
unset size
unset origin
unset multiplot
As one can see, the result is not good because it is difficult to put
the figure with line on the pm3d map accurately.
May be someone knows the better way to solve my problem?
Thank you in advance.
Aris M.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gnuplot-info mailing list
https://lists.sourceforge.net/lists/listinfo/gnuplot-info
--
View this message in context: http://old.nabble.com/How-to-draw-a-line-on-pm3d-map--tp27741566p27741970.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
Gavin Buxton
2010-03-01 13:22:08 UTC
Permalink
Couldn't you use splot?

I've only ever done this for "set view 0,0" and then I put the data at
a z value greater than the pm3d plot. Not too sure about in 3D. You
might also be able to use arrows if you just want the odd straight
line?

Let me know what your solution is as I usually end up having to plot
similar things. Thanks!
Matusevita, IĮ
2010-03-03 09:17:30 UTC
Permalink
Hello

the script suggested by Thomas works good, but I still have some questions.

1) When I try to draw not solid but dashed or dotted line (lt 2, lt 3
etc.), on the screen it looks like solid line. When I generate *.eps
file, the one part of line is dashed/dotted and the other is solid.
How can I generate dashed/dotted lines on pm3d maps?

I use GNUPLOT version 4.4, OS: Windows XP.

2) And my second problem is how to draw, for example, the hyperbola
y=1/x on the pm3d map. The result of script

reset
set parametric
set view map
set palette negative
set size square
set xrange [-50:50]
set yrange [-50:50]
set urange [-50:50]
set vrange [-50:50]
set style line 1 lt 2 lc rgb "black" lw 2
splot u,v,u with pm3d, u, 1/u,0 ls 1

is not good.

Thank you in advance.
Post by Gavin Buxton
Couldn't you use splot?
I've only ever done this for "set view 0,0" and then I put the data at
a z value greater than the pm3d plot. Not too sure about in 3D. You
might also be able to use arrows if you just want the odd straight
line?
Let me know what your solution is as I usually end up having to plot
similar things. Thanks!
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gnuplot-info mailing list
https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Thomas Sefzick
2010-03-03 16:54:18 UTC
Permalink
ad 2)
make the correlation between 'u' and 'x' non-linear and plot
the two halves of the hyperbola separately, e.g.:

# map the vrange [-50:50] to a xrange of [0:1] and make
# it non-linear, i.e. higher x-point density near zero.
fx(x)=50.*(x/100.+0.5)**2.
splot u,v,u with pm3d, fx(u),1./fx(u),0 ls 1,-fx(u), -1./fx(u),0 ls 1
Post by Matusevita, IÄ®
Hello
the script suggested by Thomas works good, but I still have some questions.
1) When I try to draw not solid but dashed or dotted line (lt 2, lt 3
etc.), on the screen it looks like solid line. When I generate *.eps
file, the one part of line is dashed/dotted and the other is solid.
How can I generate dashed/dotted lines on pm3d maps?
I use GNUPLOT version 4.4, OS: Windows XP.
2) And my second problem is how to draw, for example, the hyperbola
y=1/x on the pm3d map. The result of script
reset
set parametric
set view map
set palette negative
set size square
set xrange [-50:50]
set yrange [-50:50]
set urange [-50:50]
set vrange [-50:50]
set style line 1 lt 2 lc rgb "black" lw 2
splot u,v,u with pm3d, u, 1/u,0 ls 1
is not good.
Thank you in advance.
Post by Gavin Buxton
Couldn't you use splot?
I've only ever done this for "set view 0,0" and then I put the data at
a z value greater than the pm3d plot. Not too sure about in 3D. You
might also be able to use arrows if you just want the odd straight
line?
Let me know what your solution is as I usually end up having to plot
similar things. Thanks!
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gnuplot-info mailing list
https://lists.sourceforge.net/lists/listinfo/gnuplot-info
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
gnuplot-info mailing list
https://lists.sourceforge.net/lists/listinfo/gnuplot-info
--
View this message in context: http://old.nabble.com/How-to-draw-a-line-on-pm3d-map--tp27741566p27770706.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
Continue reading on narkive:
Loading...