Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

new user having trouble with pm3d

5 views
Skip to first unread message

Anthony

unread,
Dec 7, 2009, 8:00:25 AM12/7/09
to
hi,

i'm a new user of gnuplot. i have everything working the way i want
with the exception of my 3d data. it only plots well as lines. when
i try to use pm3d it doesn't look right. the end of the data
reconnects to the start of the data. one example of this is below.
if you try to plot this data it has the problem i describe. the data
comes from a fortran code. so i can change it if need be. i'm not
sure what to do though. the data is cylindrical in nature but
converted to x,y,z. it starts at one z level and ends at another.
this is data for two seperate surfaces.

0.14689887 1.84708219E-02 1.43891259E-04
0.10798680 0.10128819 1.05040623E-02
2.78274510E-02 0.14541692 2.08642334E-02
-6.29610419E-02 0.13400133 3.12244035E-02
-0.12970056 7.14017749E-02 4.15845737E-02
-0.14689887 -1.84708182E-02 5.19447438E-02
-0.10798680 -0.10128819 6.23049140E-02
-2.78274547E-02 -0.14541692 7.26650879E-02
6.29610345E-02 -0.13400133 8.30252543E-02
0.12970056 -7.14017823E-02 9.33854282E-02

0.43442136 8.92705247E-02 -6.13677897E-04
0.29898238 0.32756785 -4.47984859E-02
4.93422784E-02 0.44074538 -8.89832973E-02
-0.21914490 0.38557318 -0.13316810
-0.40392616 0.18312511 -0.17735291
-0.43442136 -8.92705098E-02 -0.22153772
-0.29898238 -0.32756785 -0.26572254
-4.93422896E-02 -0.44074538 -0.30990735
0.21914488 -0.38557318 -0.35409215
0.40392616 -0.18312512 -0.39827695

0.70356107 0.22635014 -9.39680613E-04
0.43614760 0.59666395 -6.85966834E-02
2.14055227E-03 0.73907238 -0.13625368
-0.43268409 0.59918028 -0.20391069
-0.70223814 0.23042172 -0.27156770
-0.70356107 -0.22635013 -0.33922470
-0.43614760 -0.59666395 -0.40688172
-2.14057020E-03 -0.73907238 -0.47453871
0.43268409 -0.59918034 -0.54219574
0.70223814 -0.23042174 -0.60985273

0.94292814 0.42594752 -9.87428008E-04
0.51247919 0.89883804 -7.20822439E-02
-0.11371934 1.0284029 -0.14317706
-0.69648099 0.76515293 -0.21427187
-1.0132105 0.20964047 -0.28536668
-0.94292814 -0.42594749 -0.35646152
-0.51247925 -0.89883798 -0.42755634
0.11371932 -1.0284029 -0.49865115
0.69648093 -0.76515293 -0.56974596
1.0132105 -0.20964050 -0.64084077

1.1418092 0.68256819 -1.05163082E-03
0.52253956 1.2233479 -7.67690539E-02
-0.29632246 1.2968502 -0.15248647
-1.0019994 0.87499994 -0.22820389
-1.3249465 0.11892937 -0.30392131
-1.1418092 -0.68256819 -0.37963873
-0.52253956 -1.2233479 -0.45535615
0.29632244 -1.2968503 -0.53107357
1.0019994 -0.87499994 -0.60679096
1.3249465 -0.11892940 -0.68250841

1.2904135 0.98909742 -1.12282916E-03
0.46258959 1.5586827 -8.19665268E-02
-0.54192781 1.5329041 -0.16281022
-1.3394473 0.92160827 -0.24365392
-1.6253433 -4.17105630E-02 -0.32449764
-1.2904135 -0.98909742 -0.40534133
-0.46258962 -1.5586827 -0.48618501
0.54192781 -1.5329041 -0.56702870
1.3394473 -0.92160833 -0.64787245
1.6253433 4.17105258E-02 -0.72871614

1.3801016 1.3369460 -1.19851250E-03
0.33068854 1.8928154 -8.74914154E-02
-0.84503633 1.7256936 -0.17378432
-1.6979860 0.89941561 -0.26007721
-1.9023627 -0.27040860 -0.34637010
-1.3801016 -1.3369459 -0.43266302
-0.33068857 -1.8928154 -0.51895589
0.84503627 -1.7256937 -0.60524881
1.6979860 -0.89941567 -0.69154173
1.9023627 0.27040857 -0.77783459

1.4035910 1.7162262 -1.26817753E-03
0.12675662 2.2134664 -9.25769582E-02
-1.1984946 1.8652375 -0.18388574
-2.0659616 0.80455142 -0.27519453
-2.1443014 -0.56344599 -0.36650330
-1.4035912 -1.7162261 -0.45781210
-0.12675667 -2.2134664 -0.54912084
1.1984946 -1.8652376 -0.64042968
2.0659616 -0.80455148 -0.73173845
2.1443014 0.56344593 -0.82304722

1.3551377 2.1159554 -1.32057583E-03
-0.14739794 2.5083737 -9.64020342E-02
-1.5936326 1.9426787 -0.19148350
-2.4311538 0.63494641 -0.28656495
-2.3400569 -0.91531384 -0.38164642
-1.3551377 -2.1159554 -0.47672787
0.14739788 -2.5083737 -0.57180935
1.5936325 -1.9426788 -0.66689080
2.4311538 -0.63494647 -0.76197225
2.3400569 0.91531378 -0.85705370

0.14689887 1.84708219E-02 1.43891259E-04
0.43442136 8.92705247E-02 -6.13677897E-04
0.70356107 0.22635014 -9.39680613E-04
0.94292814 0.42594752 -9.87428008E-04
1.1418092 0.68256819 -1.05163082E-03
1.2904135 0.98909742 -1.12282916E-03
1.3801016 1.3369460 -1.19851250E-03
1.4035910 1.7162262 -1.26817753E-03
1.3551377 2.1159554 -1.32057583E-03

0.10798680 0.10128819 1.05040614E-02
0.29898238 0.32756785 -4.47984859E-02
0.43614760 0.59666395 -6.85966834E-02
0.51247925 0.89883798 -7.20822439E-02
0.52253956 1.2233479 -7.67690465E-02
0.46258962 1.5586827 -8.19665194E-02
0.33068857 1.8928154 -8.74914080E-02
0.12675668 2.2134664 -9.25769582E-02
-0.14739786 2.5083737 -9.64020342E-02

2.78274510E-02 0.14541692 2.08642315E-02
4.93422784E-02 0.44074538 -8.89832973E-02
2.14055553E-03 0.73907238 -0.13625368
-0.11371934 1.0284029 -0.14317706
-0.29632246 1.2968502 -0.15248647
-0.54192781 1.5329041 -0.16281022
-0.84503627 1.7256936 -0.17378432
-1.1984946 1.8652375 -0.18388574
-1.5936326 1.9426787 -0.19148350

-6.29610419E-02 0.13400133 3.12244017E-02
-0.21914490 0.38557315 -0.13316812
-0.43268412 0.59918028 -0.20391069
-0.69648099 0.76515287 -0.21427189
-1.0019994 0.87499994 -0.22820389
-1.3394473 0.92160827 -0.24365392
-1.6979860 0.89941555 -0.26007721
-2.0659616 0.80455136 -0.27519453
-2.4311538 0.63494635 -0.28656498

-0.12970056 7.14017749E-02 4.15845737E-02
-0.40392616 0.18312509 -0.17735292
-0.70223814 0.23042169 -0.27156770
-1.0132105 0.20964043 -0.28536671
-1.3249465 0.11892932 -0.30392131
-1.6253433 -4.17106301E-02 -0.32449761
-1.9023627 -0.27040869 -0.34637010
-2.1443014 -0.56344604 -0.36650333
-2.3400567 -0.91531396 -0.38164642

-0.14689887 -1.84708182E-02 5.19447438E-02
-0.43442136 -8.92705396E-02 -0.22153774
-0.70356107 -0.22635017 -0.33922470
-0.94292808 -0.42594755 -0.35646152
-1.1418092 -0.68256825 -0.37963873
-1.2904135 -0.98909748 -0.40534133
-1.3801016 -1.3369460 -0.43266302
-1.4035910 -1.7162262 -0.45781210
-1.3551376 -2.1159554 -0.47672790

-0.10798680 -0.10128819 6.23049140E-02
-0.29898235 -0.32756785 -0.26572254
-0.43614754 -0.59666395 -0.40688172
-0.51247913 -0.89883804 -0.42755634
-0.52253944 -1.2233479 -0.45535615
-0.46258950 -1.5586827 -0.48618501
-0.33068842 -1.8928154 -0.51895589
-0.12675649 -2.2134664 -0.54912090
0.14739808 -2.5083737 -0.57180935

-2.78274547E-02 -0.14541692 7.26650804E-02
-4.93423454E-02 -0.44074538 -0.30990735
-2.14066729E-03 -0.73907238 -0.47453868
0.11371919 -1.0284029 -0.49865115
0.29632226 -1.2968503 -0.53107357
0.54192758 -1.5329041 -0.56702870
0.84503603 -1.7256937 -0.60524881
1.1984943 -1.8652377 -0.64042962
1.5936322 -1.9426789 -0.66689080

6.29610345E-02 -0.13400133 8.30252543E-02
0.21914493 -0.38557315 -0.35409218
0.43268415 -0.59918028 -0.54219574
0.69648105 -0.76515281 -0.56974596
1.0019995 -0.87499982 -0.60679102
1.3394474 -0.92160815 -0.64787239
1.6979861 -0.89941543 -0.69154173
2.0659616 -0.80455118 -0.73173845
2.4311538 -0.63494617 -0.76197231

0.12970056 -7.14017823E-02 9.33854207E-02
0.40392613 -0.18312515 -0.39827695
0.70223808 -0.23042180 -0.60985273
1.0132105 -0.20964058 -0.64084077
1.3249465 -0.11892951 -0.68250841
1.6253433 4.17103842E-02 -0.72871608
1.9023628 0.27040839 -0.77783459
2.1443017 0.56344575 -0.82304722
2.3400569 0.91531360 -0.85705376


0.14804992 1.29201205E-03 2.20881833E-04
0.11901547 8.80668163E-02 1.61243733E-02
4.45211641E-02 0.14120309 3.20278667E-02
-4.69787158E-02 0.14040458 4.79313582E-02
-0.12053432 8.59763026E-02 6.38348535E-02
-0.14804992 -1.29200844E-03 7.97383413E-02
-0.11901548 -8.80668163E-02 9.56418365E-02
-4.45211679E-02 -0.14120309 0.11154532
4.69787121E-02 -0.14040458 0.12744881
0.12053432 -8.59763026E-02 0.14335231

0.44414976 3.87603603E-03 -1.24323051E-04
0.35704643 0.26420045 -9.07558296E-03
0.13356349 0.42360926 -1.80268418E-02
-0.14093614 0.42121375 -2.69781016E-02
-0.36160296 0.25792891 -3.59293632E-02
-0.44414976 -3.87602532E-03 -4.48806211E-02
-0.35704643 -0.26420045 -5.38318828E-02
-0.13356350 -0.42360926 -6.27831370E-02
0.14093614 -0.42121375 -7.17343986E-02
0.36160296 -0.25792891 -8.06856602E-02

0.74024957 6.46006037E-03 -6.24515349E-04
0.59507734 0.44033408 -4.55896221E-02
0.22260582 0.70601547 -9.05547291E-02
-0.23489358 0.70202291 -0.13551983
-0.60267162 0.42988151 -0.18048494
-0.74024957 -6.46004220E-03 -0.22545004
-0.59507740 -0.44033408 -0.27041516
-0.22260584 -0.70601547 -0.31538025
0.23489356 -0.70202291 -0.36034536
0.60267162 -0.42988151 -0.40531045

1.0363494 9.04408377E-03 -9.62167396E-04
0.83310831 0.61646771 -7.02382177E-02
0.31164816 0.98842162 -0.13951427
-0.32885101 0.98283207 -0.20879033
-0.84374022 0.60183412 -0.27806637
-1.0363494 -9.04405862E-03 -0.34734243
-0.83310831 -0.61646771 -0.41661850
-0.31164819 -0.98842162 -0.48589453
0.32885098 -0.98283207 -0.55517060
0.84374022 -0.60183412 -0.62444663

1.3324492 1.16281081E-02 -9.44803935E-04
1.0711392 0.79260135 -6.89706877E-02
0.40069050 1.2708278 -0.13699657
-0.42280844 1.2636412 -0.20502245
-1.0848089 0.77378672 -0.27304834
-1.3324492 -1.16280755E-02 -0.34107423
-1.0711392 -0.79260135 -0.40910012
-0.40069053 -1.2708278 -0.47712597
0.42280841 -1.2636412 -0.54515189
1.0848088 -0.77378672 -0.61317778

1.6285491 1.42121324E-02 -9.86512052E-04
1.3091702 0.96873498 -7.20153823E-02
0.48973280 1.5532340 -0.14304425
-0.51676583 1.5444504 -0.21407312
-1.3258775 0.94573927 -0.28510198
-1.6285491 -1.42120924E-02 -0.35613084
-1.3091702 -0.96873492 -0.42715973
-0.48973286 -1.5532340 -0.49818859
0.51676583 -1.5444504 -0.56921744
1.3258775 -0.94573933 -0.64024633

1.9246489 1.67961568E-02 -1.03975821E-03
1.5472012 1.1448686 -7.59023502E-02
0.57877517 1.8356402 -0.15076494
-0.61072332 1.8252596 -0.22562753
-1.5669461 1.1176919 -0.30049011
-1.9246489 -1.67961102E-02 -0.37535271
-1.5472012 -1.1448686 -0.45021531
-0.57877517 -1.8356402 -0.52507788
0.61072326 -1.8252596 -0.59994048
1.5669461 -1.1176920 -0.67480308

2.2207487 1.93801802E-02 -1.10341900E-03
1.7852321 1.3210022 -8.05495903E-02
0.66781747 2.1180463 -0.15999575
-0.70468074 2.1060688 -0.23944192
-1.8080149 1.2896445 -0.31888810
-2.2207487 -1.93801261E-02 -0.39833426
-1.7852321 -1.3210022 -0.47778043
-0.66781753 -2.1180463 -0.55722660
0.70468068 -2.1060688 -0.63667274
1.8080148 -1.2896446 -0.71611893

2.5168486 2.19642054E-02 -1.17765029E-03
2.0232630 1.4971359 -8.59684721E-02
0.75685978 2.4004526 -0.17075929
-0.79863816 2.3868780 -0.25555012
-2.0490835 1.4615971 -0.34034094
-2.5168486 -2.19641440E-02 -0.42513177
-2.0232630 -1.4971359 -0.50992256
-0.75685984 -2.4004526 -0.59471339
0.79863811 -2.3868780 -0.67950422
2.0490835 -1.4615972 -0.76429504

0.14804992 1.29201205E-03 2.20881833E-04
0.44414976 3.87603603E-03 -1.24323051E-04
0.74024957 6.46006037E-03 -6.24515349E-04
1.0363494 9.04408377E-03 -9.62167396E-04
1.3324492 1.16281081E-02 -9.44803935E-04
1.6285491 1.42121324E-02 -9.86512052E-04
1.9246489 1.67961568E-02 -1.03975821E-03
2.2207487 1.93801802E-02 -1.10341900E-03
2.5168486 2.19642054E-02 -1.17765029E-03

0.11901547 8.80668163E-02 1.61243733E-02
0.35704643 0.26420045 -9.07558203E-03
0.59507740 0.44033405 -4.55896184E-02
0.83310831 0.61646771 -7.02382177E-02
1.0711393 0.79260135 -6.89706802E-02
1.3091702 0.96873492 -7.20153823E-02
1.5472012 1.1448686 -7.59023428E-02
1.7852322 1.3210022 -8.05495828E-02
2.0232630 1.4971359 -8.59684646E-02

4.45211641E-02 0.14120309 3.20278667E-02
0.13356350 0.42360926 -1.80268418E-02
0.22260582 0.70601547 -9.05547291E-02
0.31164816 0.98842162 -0.13951427
0.40069050 1.2708278 -0.13699657
0.48973283 1.5532340 -0.14304425
0.57877517 1.8356402 -0.15076494
0.66781747 2.1180463 -0.15999576
0.75685984 2.4004526 -0.17075929

-4.69787158E-02 0.14040458 4.79313582E-02
-0.14093615 0.42121375 -2.69781016E-02
-0.23489359 0.70202291 -0.13551983
-0.32885101 0.98283207 -0.20879033
-0.42280844 1.2636412 -0.20502245
-0.51676589 1.5444504 -0.21407312
-0.61072332 1.8252596 -0.22562753
-0.70468074 2.1060688 -0.23944193
-0.79863816 2.3868780 -0.25555012

-0.12053432 8.59763026E-02 6.38348460E-02
-0.36160296 0.25792888 -3.59293595E-02
-0.60267162 0.42988148 -0.18048494
-0.84374028 0.60183406 -0.27806637
-1.0848089 0.77378666 -0.27304834
-1.3258775 0.94573927 -0.28510201
-1.5669463 1.1176919 -0.30049011
-1.8080149 1.2896445 -0.31888810
-2.0490835 1.4615970 -0.34034094

-0.14804992 -1.29200844E-03 7.97383413E-02
-0.44414976 -3.87605303E-03 -4.48806211E-02
-0.74024957 -6.46008831E-03 -0.22545005
-1.0363494 -9.04412381E-03 -0.34734243
-1.3324492 -1.16281593E-02 -0.34107423
-1.6285491 -1.42121939E-02 -0.35613087
-1.9246489 -1.67962294E-02 -0.37535271
-2.2207487 -1.93802658E-02 -0.39833429
-2.5168486 -2.19643004E-02 -0.42513177

-0.11901548 -8.80668163E-02 9.56418365E-02
-0.35704640 -0.26420048 -5.38318790E-02
-0.59507734 -0.44033411 -0.27041516
-0.83310825 -0.61646777 -0.41661850
-1.0711392 -0.79260141 -0.40910012
-1.3091701 -0.96873504 -0.42715973
-1.5472010 -1.1448687 -0.45021531
-1.7852321 -1.3210024 -0.47778046
-2.0232630 -1.4971360 -0.50992256

-4.45211679E-02 -0.14120309 0.11154532
-0.13356356 -0.42360926 -6.27831370E-02
-0.22260593 -0.70601541 -0.31538025
-0.31164831 -0.98842156 -0.48589450
-0.40069067 -1.2708278 -0.47712597
-0.48973307 -1.5532339 -0.49818859
-0.57877541 -1.8356401 -0.52507788
-0.66781783 -2.1180463 -0.55722660
-0.75686020 -2.4004524 -0.59471339

4.69787121E-02 -0.14040458 0.12744881
0.14093618 -0.42121375 -7.17343986E-02
0.23489365 -0.70202291 -0.36034536
0.32885110 -0.98283207 -0.55517060
0.42280856 -1.2636412 -0.54515189
0.51676601 -1.5444504 -0.56921750
0.61072350 -1.8252596 -0.59994048
0.70468092 -2.1060686 -0.63667279
0.79863840 -2.3868778 -0.67950422

0.12053432 -8.59763026E-02 0.14335230
0.36160293 -0.25792894 -8.06856528E-02
0.60267156 -0.42988157 -0.40531045
0.84374017 -0.60183418 -0.62444663
1.0848088 -0.77378684 -0.61317772
1.3258774 -0.94573945 -0.64024633
1.5669460 -1.1176921 -0.67480308
1.8080146 -1.2896447 -0.71611893
2.0490832 -1.4615973 -0.76429504

Zoltan

unread,
Dec 8, 2009, 3:40:24 AM12/8/09
to
On Dec 7, 2:00 pm, Anthony <myspambox45...@live.com> wrote:
> hi,
>
> i'm a new user of gnuplot.  i have everything working the way i want
> with the exception of my 3d data.  it only plots well as lines.  when
> i try to use pm3d it doesn't look right.  the end of the data
> reconnects to the start of the data.  one example of this is below.
> if you try to plot this data it has the problem i describe.  the data
> comes from a fortran code.  so i can change it if need be.  i'm not
> sure what to do though.  the data is cylindrical in nature but
> converted to x,y,z.  it starts at one z level and ends at another.
> this is data for two seperate surfaces.

First, saying that pm3d doesn't work is a broad statement. pm3d can be
used in many different ways, so it would be better, if you could post
your gnuplot commands. Also, you should post a minimal script with a
minimal data set. Yours is just a bit too long.
However, what I don't understand is what and how you want to plot: you
say that these data are for two separate surfaces, and yet, there is
nothing in your data set that would signify this. (N.B. this is one
point where you could simplify things: does gnuplot fail your
expectations, even when you want to plot only one surface, or it
happens with two only?) Did you read the content of
?datafile
Are you sure that this is the correct format for what you want?
Cheers,
Zoltán

Anthony

unread,
Dec 8, 2009, 11:03:02 AM12/8/09
to

hi,

sorry when i copied the data to the message it changed the line
spacing. i didn't notice that until you mentioned you didn't see how
the data was seperated. here is just the first surface. its a helix
basically. it starts out at one z level and ends on another. when i
try using pm3d it connects the start of the data to the end of the
data. making the plot look weird. i have other data sets that do the
same thing. i'm sure it has something to do with the data layout.
but i'm not sure what i need to do so that gnuplot understands the
data. it looks fine as lines. i've read various tutorials and help
files but i'm still not sure what i need to do in order to get it to
plot right. i'm not saying pm3d is broke. i'm saying i don't know
how to layout my data so that it understands it. all the data is
generated by fortran. so if i understand how i need to lay it out i
can change the code. i don't know if using cylindrical coordinates
would be better or just leave it as x,y,z. mainly i need to know how
to stop getting the start of the data to reconnect to the end of the
data. below is a different set of data. just one surface. its not a
helix but has the same issue of the start reconnecting with the end
when you try and use pm3d.

0.0000000 2.91227131E-09 6.66249990E-02
0.0000000 -8.73681394E-09 -0.19987500

0.29489881 2.76182219E-02 6.62766472E-02
0.29173914 5.46509400E-02 -0.19882995

0.57928979 0.12378690 6.53157458E-02
0.56716567 0.17494267 -0.19594723

0.84115088 0.28626981 6.39512613E-02
0.81558841 0.35650218 -0.19185379

1.0689113 0.51076394 6.24212474E-02
1.0270990 0.59401894 -0.18726374

1.2518151 0.79103214 6.09150678E-02
1.1924989 0.88121808 -0.18274520

1.3802147 1.1191269 5.95468953E-02
1.3033782 1.2106969 -0.17864069

1.4457960 1.4856358 5.83663508E-02
1.3523175 1.5738282 -0.17509905

1.4417597 1.8799229 5.73812127E-02
1.3331301 1.9607944 -0.17214364

1.3629699 2.2903657 5.65773398E-02
1.2410898 2.3607333 -0.16973202

0.0000000 2.91227131E-09 6.66249990E-02
0.29489881 2.76182219E-02 6.62766472E-02
0.57928979 0.12378690 6.53157458E-02
0.84115088 0.28626981 6.39512688E-02
1.0689113 0.51076394 6.24212474E-02
1.2518151 0.79103214 6.09150678E-02
1.3802147 1.1191269 5.95468953E-02
1.4457960 1.4856358 5.83663508E-02
1.4417597 1.8799229 5.73812164E-02
1.3629699 2.2903657 5.65773398E-02

0.0000000 -8.73681394E-09 -0.19987500
0.29173914 5.46509400E-02 -0.19882993
0.56716567 0.17494267 -0.19594723
0.81558841 0.35650218 -0.19185379
1.0270990 0.59401894 -0.18726374
1.1924989 0.88121808 -0.18274520
1.3033782 1.2106969 -0.17864069
1.3523175 1.5738282 -0.17509905
1.3331301 1.9607944 -0.17214365
1.2410898 2.3607333 -0.16973202

Zoltan

unread,
Dec 8, 2009, 4:27:49 PM12/8/09
to
> sorry when i copied the data to the message it changed the line
> spacing.  

But this new data set has the same problem...

> data.  it looks fine as lines.  i've read various tutorials and help
> files but i'm still not sure what i need to do in order to get it to
> plot right.  

You could say

?datafile
?index

to see what the structure must be like. The second one contains
information on how data sets must be separated. However, if you
generate your data yourself, perhaps, it is better to write the two
data sets into to files.

You should also read the output of

?pm3d

which explains how pm3d data are drawn.
Cheers,
Zoltán

Anthony

unread,
Dec 8, 2009, 9:21:29 PM12/8/09
to
> Zoltán- Hide quoted text -
>
> - Show quoted text -

hi, thanks the pm3d help was useful. two out of three of the data
sets i have were fixed by using the flush end option. however the
helix data still connects the start to the end. if anyone can try
plotting the data below and let me know if you can get it to plot
right and how you did it. i tried various options with the pm3d
command and nothing helped. there should just be one line between
each set of data below. it will plot as one surface. it looks fine
with lines.

0.14804992 1.29201205E-03 -1.31718693E-02
0.11901547 8.80668163E-02 -0.96154648
4.45211641E-02 0.14120309 -1.9099211
-4.69787158E-02 0.14040458 -2.8582957
-0.12053432 8.59763026E-02 -3.8066702
-0.14804992 -1.29200844E-03 -4.7550449
-0.11901548 -8.80668163E-02 -5.7034192
-4.45211679E-02 -0.14120309 -6.6517940
4.69787121E-02 -0.14040458 -7.6001687
0.12053432 -8.59763026E-02 -8.5485430

0.44414976 3.87603603E-03 -9.31486487E-03
0.35704643 0.26420045 -0.67998517
0.13356349 0.42360926 -1.3506554
-0.14093614 0.42121375 -2.0213256
-0.36160296 0.25792891 -2.6919959
-0.44414976 -3.87602532E-03 -3.3626661
-0.35704643 -0.26420045 -4.0333366
-0.13356350 -0.42360926 -4.7040067
0.14093614 -0.42121375 -5.3746772
0.36160296 -0.25792891 -6.0453472

0.74024957 6.46006037E-03 -8.90444499E-03
0.59507734 0.44033408 -0.65002447
0.22260582 0.70601547 -1.2911445
-0.23489358 0.70202291 -1.9322646
-0.60267162 0.42988151 -2.5733845
-0.74024957 -6.46004220E-03 -3.2145047
-0.59507740 -0.44033408 -3.8556247
-0.22260584 -0.70601547 -4.4967446
0.23489356 -0.70202291 -5.1378646
0.60267162 -0.42988151 -5.7789850

1.0363494 9.04408377E-03 -8.81280098E-03
0.83310831 0.61646771 -0.64333445
0.31164816 0.98842162 -1.2778561
-0.32885101 0.98283207 -1.9123778
-0.84374022 0.60183412 -2.5468996
-1.0363494 -9.04405862E-03 -3.1814210
-0.83310831 -0.61646771 -3.8159428
-0.31164819 -0.98842162 -4.4504647
0.32885098 -0.98283207 -5.0849862
0.84374022 -0.60183412 -5.7195077

1.3324492 1.16281081E-02 -8.83840490E-03
1.0711392 0.79260135 -0.64520353
0.40069050 1.2708278 -1.2815688
-0.42280844 1.2636412 -1.9179338
-1.0848089 0.77378672 -2.5542991
-1.3324492 -1.16280755E-02 -3.1906641
-1.0711392 -0.79260135 -3.8270292
-0.40069053 -1.2708278 -4.4633946
0.42280841 -1.2636412 -5.0997596
1.0848088 -0.77378672 -5.7361250

1.6285491 1.42121324E-02 -8.91948398E-03
1.3091702 0.96873498 -0.65112233
0.48973280 1.5532340 -1.2933252
-0.51676583 1.5444504 -1.9355280
-1.3258775 0.94573927 -2.5777309
-1.6285491 -1.42120924E-02 -3.2199337
-1.3091702 -0.96873492 -3.8621366
-0.48973286 -1.5532340 -4.5043392
0.51676583 -1.5444504 -5.1465421
1.3258775 -0.94573933 -5.7887449

1.9246489 1.67961568E-02 -9.06223152E-03
1.5472012 1.1448686 -0.66154289
0.57877517 1.8356402 -1.3140236
-0.61072332 1.8252596 -1.9665042
-1.5669461 1.1176919 -2.6189849
-1.9246489 -1.67961102E-02 -3.2714655
-1.5472012 -1.1448686 -3.9239461
-0.57877517 -1.8356402 -4.5764270
0.61072326 -1.8252596 -5.2289076
1.5669461 -1.1176920 -5.8813882

2.2207487 1.93801802E-02 -9.55348276E-03
1.7852321 1.3210022 -0.69740427
0.66781747 2.1180463 -1.3852550
-0.70468074 2.1060688 -2.0731058
-1.8080149 1.2896445 -2.7609565
-2.2207487 -1.93801261E-02 -3.4488072
-1.7852321 -1.3210022 -4.1366582
-0.66781753 -2.1180463 -4.8245087
0.70468068 -2.1060688 -5.5123596
1.8080148 -1.2896446 -6.2002101

2.5168486 2.19642054E-02 -1.06810555E-02
2.0232630 1.4971359 -0.77971703
0.75685978 2.4004526 -1.5487530
-0.79863816 2.3868780 -2.3177891
-2.0490835 1.4615971 -3.0868251
-2.5168486 -2.19641440E-02 -3.8558609
-2.0232630 -1.4971359 -4.6248970
-0.75685984 -2.4004526 -5.3939328
0.79863811 -2.3868780 -6.1629691
2.0490835 -1.4615972 -6.9320049

0.14804992 1.29201205E-03 -1.31718693E-02
0.44414976 3.87603603E-03 -9.31486487E-03
0.74024957 6.46006037E-03 -8.90444499E-03
1.0363494 9.04408377E-03 -8.81280098E-03
1.3324492 1.16281081E-02 -8.83840490E-03
1.6285491 1.42121324E-02 -8.91948398E-03
1.9246489 1.67961568E-02 -9.06223152E-03
2.2207487 1.93801802E-02 -9.55348276E-03
2.5168486 2.19642054E-02 -1.06810555E-02

0.11901547 8.80668163E-02 -0.96154642
0.35704643 0.26420045 -0.67998511
0.59507740 0.44033405 -0.65002441
0.83310831 0.61646771 -0.64333445
1.0711393 0.79260135 -0.64520353
1.3091702 0.96873492 -0.65112233
1.5472012 1.1448686 -0.66154283
1.7852322 1.3210022 -0.69740421
2.0232630 1.4971359 -0.77971703

4.45211641E-02 0.14120309 -1.9099211
0.13356350 0.42360926 -1.3506553
0.22260582 0.70601547 -1.2911445
0.31164816 0.98842162 -1.2778561
0.40069050 1.2708278 -1.2815686
0.48973283 1.5532340 -1.2933252
0.57877517 1.8356402 -1.3140235
0.66781747 2.1180463 -1.3852550
0.75685984 2.4004526 -1.5487530

-4.69787158E-02 0.14040458 -2.8582957
-0.14093615 0.42121375 -2.0213256
-0.23489359 0.70202291 -1.9322646
-0.32885101 0.98283207 -1.9123778
-0.42280844 1.2636412 -1.9179338
-0.51676589 1.5444504 -1.9355280
-0.61072332 1.8252596 -1.9665042
-0.70468074 2.1060688 -2.0731058
-0.79863816 2.3868780 -2.3177891

-0.12053432 8.59763026E-02 -3.8066704
-0.36160296 0.25792888 -2.6919959
-0.60267162 0.42988148 -2.5733845
-0.84374028 0.60183406 -2.5468996
-1.0848089 0.77378666 -2.5542991
-1.3258775 0.94573927 -2.5777309
-1.5669463 1.1176919 -2.6189849
-1.8080149 1.2896445 -2.7609565
-2.0490835 1.4615970 -3.0868251

-0.14804992 -1.29200844E-03 -4.7550449
-0.44414976 -3.87605303E-03 -3.3626661
-0.74024957 -6.46008831E-03 -3.2145045
-1.0363494 -9.04412381E-03 -3.1814213
-1.3324492 -1.16281593E-02 -3.1906643
-1.6285491 -1.42121939E-02 -3.2199337
-1.9246489 -1.67962294E-02 -3.2714655
-2.2207487 -1.93802658E-02 -3.4488072
-2.5168486 -2.19643004E-02 -3.8558609

-0.11901548 -8.80668163E-02 -5.7034197
-0.35704640 -0.26420048 -4.0333366
-0.59507734 -0.44033411 -3.8556247
-0.83310825 -0.61646777 -3.8159430
-1.0711392 -0.79260141 -3.8270295
-1.3091701 -0.96873504 -3.8621366
-1.5472010 -1.1448687 -3.9239461
-1.7852321 -1.3210024 -4.1366582
-2.0232630 -1.4971360 -4.6248970

-4.45211679E-02 -0.14120309 -6.6517940
-0.13356356 -0.42360926 -4.7040067
-0.22260593 -0.70601541 -4.4967446
-0.31164831 -0.98842156 -4.4504642
-0.40069067 -1.2708278 -4.4633942
-0.48973307 -1.5532339 -4.5043392
-0.57877541 -1.8356401 -4.5764265
-0.66781783 -2.1180463 -4.8245087
-0.75686020 -2.4004524 -5.3939328

4.69787121E-02 -0.14040458 -7.6001687
0.14093618 -0.42121375 -5.3746772
0.23489365 -0.70202291 -5.1378646
0.32885110 -0.98283207 -5.0849862
0.42280856 -1.2636412 -5.0997596
0.51676601 -1.5444504 -5.1465425
0.61072350 -1.8252596 -5.2289076
0.70468092 -2.1060686 -5.5123596
0.79863840 -2.3868778 -6.1629691

0.12053432 -8.59763026E-02 -8.5485430
0.36160293 -0.25792894 -6.0453472
0.60267156 -0.42988157 -5.7789845
0.84374017 -0.60183418 -5.7195077
1.0848088 -0.77378684 -5.7361245
1.3258774 -0.94573945 -5.7887449
1.5669460 -1.1176921 -5.8813882
1.8080146 -1.2896447 -6.2002101
2.0490832 -1.4615973 -6.9320049

Christoph Bersch

unread,
Dec 9, 2009, 4:18:33 AM12/9/09
to
Anthony schrieb:
>>>> Zolt�n

>>> sorry when i copied the data to the message it changed the line
>>> spacing.
>> But this new data set has the same problem...
>>
>>> data. it looks fine as lines. i've read various tutorials and help
>>> files but i'm still not sure what i need to do in order to get it to
>>> plot right.
>> You could say
>>
>> ?datafile
>> ?index
>>
>> to see what the structure must be like. The second one contains
>> information on how data sets must be separated. However, if you
>> generate your data yourself, perhaps, it is better to write the two
>> data sets into to files.
>>
>> You should also read the output of
>>
>> ?pm3d
>>
>> which explains how pm3d data are drawn.
>> Cheers,
>> Zolt�n- Hide quoted text -

>>
>> - Show quoted text -
>
> hi, thanks the pm3d help was useful. two out of three of the data
> sets i have were fixed by using the flush end option.

I guess that wasn't the main point.

In the data you posted in your previous message, you had to much
unnecessary data. With the following command the data are plotted correctly:

set pm3d
splot '-' w pm3d


0.0000000 2.91227131E-09 6.66249990E-02
0.29489881 2.76182219E-02 6.62766472E-02
0.57928979 0.12378690 6.53157458E-02
0.84115088 0.28626981 6.39512688E-02
1.0689113 0.51076394 6.24212474E-02
1.2518151 0.79103214 6.09150678E-02
1.3802147 1.1191269 5.95468953E-02
1.4457960 1.4856358 5.83663508E-02
1.4417597 1.8799229 5.73812164E-02
1.3629699 2.2903657 5.65773398E-02

0.0000000 -8.73681394E-09 -0.19987500
0.29173914 5.46509400E-02 -0.19882993
0.56716567 0.17494267 -0.19594723
0.81558841 0.35650218 -0.19185379
1.0270990 0.59401894 -0.18726374
1.1924989 0.88121808 -0.18274520
1.3033782 1.2106969 -0.17864069
1.3523175 1.5738282 -0.17509905
1.3331301 1.9607944 -0.17214365
1.2410898 2.3607333 -0.16973202

e

> however the
> helix data still connects the start to the end. if anyone can try
> plotting the data below and let me know if you can get it to plot
> right and how you did it. i tried various options with the pm3d
> command and nothing helped. there should just be one line between
> each set of data below. it will plot as one surface. it looks fine
> with lines.

I quess, this time you have again too much data stored.

In order to understand better the format that pm3d requires, you should
plot your data with following commands:

set pm3d
splot 'data.dat' every :::0::1 with pm3d

splot 'data.dat' every :::0::8 with pm3d

splot 'data.dat' every :::0::9 with pm3d

With the 'every' statement you select only distinct blocks in you data file.
As you see, the last plot command messes up the surface plot. I suppose,
from block 10 you have superfluous data that is not needed for the
surface plot.

I hope that helps you,

Christoph

Steffen

unread,
Dec 9, 2009, 4:36:23 AM12/9/09
to
Hi Anthony,

> comes from a fortran code. so i can change it if need be. i'm not
> sure what to do though. the data is cylindrical in nature but
> converted to x,y,z. it starts at one z level and ends at another.
> this is data for two seperate surfaces.

[ x y z ]

I can't solve your very problem in the format you provide the data, but
you might want to consider to print out your data in the format
[ theta z r ], i.e. cylindrical coordinates. That seems to fit your
needs better and you provide the data in a manner pm3d can understand.
Take following data 'data.dat'

0 0 0.5
30 0 0.6
60 0 0.7
90 0 0.8
120 0 0.9
150 0 1.0
180 0 0.9
210 0 0.8
240 0 0.7
270 0 0.6
300 0 0.5
330 0 0.4

0 1 0.8
30 1 0.7
60 1 0.6
90 1 0.5
120 1 0.6
150 1 0.7
180 1 0.8
210 1 0.9
240 1 1.0
270 1 0.9
300 1 0.8
330 1 0.7

and issue the commands

set mapping cylindrical
set angles degrees
plot 'data.dat' with pm3d

As you can see the data forms a regular grid in the cylindrical [theta,
z] coordinates, the dependent variable is r (3rd row, the cylinder
radius). From data block to data block the same pattern for theta
repeats but the "z" value is increased by a certain amount. In that way
you build your 3d surface slice by slice in the z direction.

cheers,

Steffen

Anthony

unread,
Dec 10, 2009, 7:05:29 PM12/10/09
to
> >>>> Zoltán

> >>> sorry when i copied the data to the message it changed the line
> >>> spacing.  
> >> But this new data set has the same problem...
>
> >>> data.  it looks fine as lines.  i've read various tutorials and help
> >>> files but i'm still not sure what i need to do in order to get it to
> >>> plot right.  
> >> You could say
>
> >> ?datafile
> >> ?index
>
> >> to see what the structure must be like. The second one contains
> >> information on how data sets must be separated. However, if you
> >> generate your data yourself, perhaps, it is better to write the two
> >> data sets into to files.
>
> >> You should also read the output of
>
> >> ?pm3d
>
> >> which explains how pm3d data are drawn.
> >> Cheers,
> >> Zoltán- Hide quoted text -
> Christoph- Hide quoted text -

>
> - Show quoted text -

hi cristoph,

thanks you found the problem. i used what you found and what i found
with the ?pm3d help info to get really close to what I want. The only
problem now is that if you have two data sets gnuplot always plots the
second one first regardless of your point of view. Is there a way to
get multiple data sets to plot based on their true 3d position and the
users point of view.

Christoph Bersch

unread,
Dec 11, 2009, 2:13:36 AM12/11/09
to
Anthony schrieb:

>
> The only problem now is that if you have two data sets gnuplot always
> plots the second one first regardless of your point of view. Is
> there a way to get multiple data sets to plot based on their true 3d
> position and the users point of view.

Try to use 'set pm3d depthorder'

Christoph

Anthony

unread,
Dec 11, 2009, 11:19:23 AM12/11/09
to

hi,

depthorder works if you have one data set but if you have two seperate
ones it doesn't seem to do anything. if i try to put both data sets
into one then everything gets messed up. here is some cleaned up data
below.

0.14689887 1.84708219E-02 -2.53370143E-02
0.10798680 0.10128819 -1.8496021
2.78274510E-02 0.14541692 -3.6738670
-6.29610419E-02 0.13400133 -5.4981322
-0.12970056 7.14017749E-02 -7.3223972
-0.14689887 -1.84708182E-02 -9.1466618
-0.10798680 -0.10128819 -10.970927
-2.78274547E-02 -0.14541692 -12.795193
6.29610345E-02 -0.13400133 -14.619457
0.12970056 -7.14017823E-02 -16.443722

0.43442136 8.92705247E-02 -2.44512968E-02
0.29898238 0.32756785 -1.7849447
4.93422784E-02 0.44074538 -3.5454381
-0.21914490 0.38557318 -5.3059316
-0.40392616 0.18312511 -7.0664248
-0.43442136 -8.92705098E-02 -8.8269186
-0.29898238 -0.32756785 -10.587412
-4.93422896E-02 -0.44074538 -12.347905
0.21914488 -0.38557318 -14.108398
0.40392616 -0.18312512 -15.868892

0.70356107 0.22635014 -2.37502623E-02
0.43614760 0.59666395 -1.7337692
2.14055227E-03 0.73907238 -3.4437881
-0.43268409 0.59918028 -5.1538072
-0.70223814 0.23042172 -6.8638258
-0.70356107 -0.22635013 -8.5738449
-0.43614760 -0.59666395 -10.283864
-2.14057020E-03 -0.73907238 -11.993882
0.43268409 -0.59918034 -13.703901
0.70223814 -0.23042174 -15.413920

0.94292814 0.42594752 -2.34303530E-02
0.51247919 0.89883804 -1.7104157
-0.11371934 1.0284029 -3.3974011
-0.69648099 0.76515293 -5.0843868
-1.0132105 0.20964047 -6.7713718
-0.94292814 -0.42594749 -8.4583578
-0.51247925 -0.89883798 -10.145343
0.11371932 -1.0284029 -11.832328
0.69648093 -0.76515293 -13.519314
1.0132105 -0.20964050 -15.206299

1.1418092 0.68256819 -2.32261531E-02
0.52253956 1.2233479 -1.6955092
-0.29632246 1.2968502 -3.3677921
-1.0019994 0.87499994 -5.0400753
-1.3249465 0.11892937 -6.7123585
-1.1418092 -0.68256819 -8.3846416
-0.52253956 -1.2233479 -10.056924
0.29632244 -1.2968503 -11.729207
1.0019994 -0.87499994 -13.401490
1.3249465 -0.11892940 -15.073773

1.2904135 0.98909742 -2.30609421E-02
0.46258959 1.5586827 -1.6834488
-0.54192781 1.5329041 -3.3438365
-1.3394473 0.92160827 -5.0042243
-1.6253433 -4.17105630E-02 -6.6646123
-1.2904135 -0.98909742 -8.3249998
-0.46258962 -1.5586827 -9.9853878
0.54192781 -1.5329041 -11.645776
1.3394473 -0.92160833 -13.306164
1.6253433 4.17105258E-02 -14.966552

1.3801016 1.3369460 -2.29149070E-02
0.33068854 1.8928154 -1.6727883
-0.84503633 1.7256936 -3.3226614
-1.6979860 0.89941561 -4.9725347
-1.9023627 -0.27040860 -6.6224079
-1.3801016 -1.3369459 -8.2722816
-0.33068857 -1.8928154 -9.9221544
0.84503627 -1.7256937 -11.572028
1.6979860 -0.89941567 -13.221901
1.9023627 0.27040857 -14.871775

1.4035910 1.7162262 -2.28402782E-02
0.12675662 2.2134664 -1.6673403
-1.1984946 1.8652375 -3.3118403
-2.0659616 0.80455142 -4.9563403
-2.1443014 -0.56344599 -6.6008406
-1.4035912 -1.7162261 -8.2453403
-0.12675667 -2.2134664 -9.8898401
1.1984946 -1.8652376 -11.534341
2.0659616 -0.80455148 -13.178841
2.1443014 0.56344593 -14.823340

1.3551377 2.1159554 -2.25177519E-02
-0.14739794 2.5083737 -1.6437958
-1.5936326 1.9426787 -3.2650740
-2.4311538 0.63494641 -4.8863521
-2.3400569 -0.91531384 -6.5076303
-1.3551377 -2.1159554 -8.1289082
0.14739788 -2.5083737 -9.7501869
1.5936325 -1.9426788 -11.371465
2.4311538 -0.63494647 -12.992743
2.3400569 0.91531378 -14.614021


-------------------- second data set ---------------------------------


0.14804992 1.29201205E-03 -2.51636580E-02
0.11901547 8.80668163E-02 -1.8369471
4.45211641E-02 0.14120309 -3.6487305
-4.69787158E-02 0.14040458 -5.4605136
-0.12053432 8.59763026E-02 -7.2722974
-0.14804992 -1.29200844E-03 -9.0840807
-0.11901548 -8.80668163E-02 -10.895864
-4.45211679E-02 -0.14120309 -12.707647
4.69787121E-02 -0.14040458 -14.519431
0.12053432 -8.59763026E-02 -16.331215

0.44414976 3.87603603E-03 -2.42528133E-02
0.35704643 0.26420045 -1.7704554
0.13356349 0.42360926 -3.5166578
-0.14093614 0.42121375 -5.2628603
-0.36160296 0.25792891 -7.0090632
-0.44414976 -3.87602532E-03 -8.7552652
-0.35704643 -0.26420045 -10.501468
-0.13356350 -0.42360926 -12.247671
0.14093614 -0.42121375 -13.993874
0.36160296 -0.25792891 -15.740076

0.74024957 6.46006037E-03 -2.35467814E-02
0.59507734 0.44033408 -1.7189150
0.22260582 0.70601547 -3.4142833
-0.23489358 0.70202291 -5.1096516
-0.60267162 0.42988151 -6.8050199
-0.74024957 -6.46004220E-03 -8.5003881
-0.59507740 -0.44033408 -10.195756
-0.22260584 -0.70601547 -11.891125
0.23489356 -0.70202291 -13.586493
0.60267162 -0.42988151 -15.281861

1.0363494 9.04408377E-03 -2.32482031E-02
0.83310831 0.61646771 -1.6971189
0.31164816 0.98842162 -3.3709896
-0.32885101 0.98283207 -5.0448599
-0.84374022 0.60183412 -6.7187309
-1.0363494 -9.04405862E-03 -8.3926010
-0.83310831 -0.61646771 -10.066472
-0.31164819 -0.98842162 -11.740342
0.32885098 -0.98283207 -13.414213
0.84374022 -0.60183412 -15.088084

1.3324492 1.16281081E-02 -2.30920985E-02
1.0711392 0.79260135 -1.6857232
0.40069050 1.2708278 -3.3483543
-0.42280844 1.2636412 -5.0109854
-1.0848089 0.77378672 -6.6736164
-1.3324492 -1.16280755E-02 -8.3362474
-1.0711392 -0.79260135 -9.9988785
-0.40069053 -1.2708278 -11.661510
0.42280841 -1.2636412 -13.324141
1.0848088 -0.77378672 -14.986772

1.6285491 1.42121324E-02 -2.30142381E-02
1.3091702 0.96873498 -1.6800394
0.48973280 1.5532340 -3.3370645
-0.51676583 1.5444504 -4.9940896
-1.3258775 0.94573927 -6.6511149
-1.6285491 -1.42120924E-02 -8.3081398
-1.3091702 -0.96873492 -9.9651651
-0.48973286 -1.5532340 -11.622190
0.51676583 -1.5444504 -13.279216
1.3258775 -0.94573933 -14.936240

1.9246489 1.67961568E-02 -2.30126083E-02
1.5472012 1.1448686 -1.6799204
0.57877517 1.8356402 -3.3368282
-0.61072332 1.8252596 -4.9937358
-1.5669461 1.1176919 -6.6506438
-1.9246489 -1.67961102E-02 -8.3075514
-1.5472012 -1.1448686 -9.9644594
-0.57877517 -1.8356402 -11.621367
0.61072326 -1.8252596 -13.278275
1.5669461 -1.1176920 -14.935183

2.2207487 1.93801802E-02 -2.31718794E-02
1.7852321 1.3210022 -1.6915472
0.66781747 2.1180463 -3.3599224
-0.70468074 2.1060688 -5.0282979
-1.8080149 1.2896445 -6.6966729
-2.2207487 -1.93801261E-02 -8.3650484
-1.7852321 -1.3210022 -10.033423
-0.66781753 -2.1180463 -11.701799
0.70468068 -2.1060688 -13.370174
1.8080148 -1.2896446 -15.038549

2.5168486 2.19642054E-02 -2.27507055E-02
2.0232630 1.4971359 -1.6608015
0.75685978 2.4004526 -3.2988522
-0.79863816 2.3868780 -4.9369030
-2.0490835 1.4615971 -6.5749540
-2.5168486 -2.19641440E-02 -8.2130051
-2.0232630 -1.4971359 -9.8510551
-0.75685984 -2.4004526 -11.489106
0.79863811 -2.3868780 -13.127157
2.0490835 -1.4615972 -14.765208


i fixed the fortran code so no extra data is there.

0 new messages