|
From: Manfred S. <man...@gm...> - 2013-05-08 12:33:45
|
Hi,
I tried to upgrade from gnuplot 4.4 to 4.6 and faced a new error
in my plot script:
"Tabular output of this 3D plot style not implemented"
I read the release announcements but found no indication of some
pm3d behaviour changes, so I'm quite baffled. Also searching the
net did not reveal much useful information.
So how is one supposed to use pm3d in gnuplot 4.6?
I'd like to to some 2D maps with contours on top of it. My script
looks roughly as follows:
set pm3d interpolate 40,40 implicit map
unset surface
set contour
set cntrparam bspline
set cntrparam levels auto 10
set table '$TMPCONT1'
splot '$INFILE1'
unset table
set cntrparam levels auto 5
set table '$TMPCONT2'
splot '$INFILE2'
unset table
# Change single blank lines to double blank lines
!awk "NF<2{printf\"\n\"}{print}" <$TMPCONT1 >$TMPCONT1_1
!awk "NF<2{printf\"\n\"}{print}" <$TMPCONT2 >$TMPCONT2_1
reset
set multiplot
set pm3d interpolate 40,40 explicit map
#---plot contour labels using Petr Mikulik's script:
!awk -f label_contours.awk -v nth=40 center=1 textcolor=1 inclt=0 $TMPCONT1 >$TMPGP
load '$TMPGP'
splot '$INFILE2' notitle with pm3d, \
'$TMPCONT1_1' notitle with lines lt -1, \
'$TMPCONT2_1' notitle with lines lc rgb "gray70"
Thanks!
Manfred
|
|
From: Ethan M. <merritt@u.washington.edu> - 2013-05-08 16:18:48
|
On Wednesday, May 08, 2013 05:33:22 am Manfred Schwarb wrote:
> Hi,
>
> I tried to upgrade from gnuplot 4.4 to 4.6 and faced a new error
> in my plot script:
> "Tabular output of this 3D plot style not implemented"
>
> I read the release announcements but found no indication of some
> pm3d behaviour changes, so I'm quite baffled. Also searching the
> net did not reveal much useful information.
>
> So how is one supposed to use pm3d in gnuplot 4.6?
Could you explain more clearly what you are trying to do?
So far as I know, it is not necessary to use tabular output for
either pm3d or contour plots. Similarly the "set multiplot"
command in your script seems unnecessary.
The simple answer would be:
reset
set contour
splot '$INFILE' with pm3d
Season to taste with your preferred pm3d or contour settings.
If there is some particular combination of settings that
causes a problem then maybe we can help with that.
Ethan
>
> I'd like to to some 2D maps with contours on top of it. My script
> looks roughly as follows:
>
>
> set pm3d interpolate 40,40 implicit map
> unset surface
> set contour
> set cntrparam bspline
> set cntrparam levels auto 10
> set table '$TMPCONT1'
> splot '$INFILE1'
> unset table
>
> set cntrparam levels auto 5
> set table '$TMPCONT2'
> splot '$INFILE2'
> unset table
>
> # Change single blank lines to double blank lines
> !awk "NF<2{printf\"\n\"}{print}" <$TMPCONT1 >$TMPCONT1_1
> !awk "NF<2{printf\"\n\"}{print}" <$TMPCONT2 >$TMPCONT2_1
>
> reset
> set multiplot
>
> set pm3d interpolate 40,40 explicit map
> #---plot contour labels using Petr Mikulik's script:
> !awk -f label_contours.awk -v nth=40 center=1 textcolor=1 inclt=0 $TMPCONT1 >$TMPGP
> load '$TMPGP'
>
> splot '$INFILE2' notitle with pm3d, \
> '$TMPCONT1_1' notitle with lines lt -1, \
> '$TMPCONT2_1' notitle with lines lc rgb "gray70"
>
>
> Thanks!
> Manfred
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their applications. This 200-page book is written by three acclaimed
> leaders in the field. The early access version is available now.
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> gnuplot-beta mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
>
--
Ethan A Merritt
Biomolecular Structure Center, K-428 Health Sciences Bldg
University of Washington, Seattle 98195-7742
|
|
From: Manfred S. <man...@gm...> - 2013-05-08 22:05:08
|
Hi Ethan,
Am 08.05.2013 18:17, schrieb Ethan Merritt:
> On Wednesday, May 08, 2013 05:33:22 am Manfred Schwarb wrote:
>> Hi,
>>
>> I tried to upgrade from gnuplot 4.4 to 4.6 and faced a new error
>> in my plot script:
>> "Tabular output of this 3D plot style not implemented"
>>
>> I read the release announcements but found no indication of some
>> pm3d behaviour changes, so I'm quite baffled. Also searching the
>> net did not reveal much useful information.
>>
>> So how is one supposed to use pm3d in gnuplot 4.6?
>
> Could you explain more clearly what you are trying to do?
Which part of the example below is not clear? One surface plot (2D map)
with contours, a second 2D map without surface but only contours,
and corresponding contour labels. But see below.
> So far as I know, it is not necessary to use tabular output for
> either pm3d or contour plots. Similarly the "set multiplot"
> command in your script seems unnecessary.
>
> The simple answer would be:
> reset
> set contour
> splot '$INFILE' with pm3d
>
Yes, this works perfectly if I have only one dataset and want to do
a 2D map with contours.
But I want to do two contour plots (2D map) in the same graph, one with colored
surface plus grey contours, the other one with black contours without surface plotting
using data from another source.
So this can't be issued in one single splot command.
Therefore you suggest to overlay multiple splot commands?
set multiplot
set contour
splot '$INFILE1' notitle with pm3d lc rgb "grey"
set view map
unset surface
splot '$INFILE2' notitle with lines lt -1
This works, but I somehow can't paint the lines black, the "lt -1"
seems ineffective (also lc rgb "grey" seems not to work).
But then I have still the problem with the contour labels.
I really have no idea how to produce them without using tables.
Please enlighten me.
The really strange thing is, this worked perfectly, but then
someone put in some "error: not implemented" statement.
How could this be not implemented, if it worked perfectly before?
Cheers,
Manfred
> Season to taste with your preferred pm3d or contour settings.
> If there is some particular combination of settings that
> causes a problem then maybe we can help with that.
>
> Ethan
>
>
>
>>
>> I'd like to to some 2D maps with contours on top of it. My script
>> looks roughly as follows:
>>
>>
>> set pm3d interpolate 40,40 implicit map
>> unset surface
>> set contour
>> set cntrparam bspline
>> set cntrparam levels auto 10
>> set table '$TMPCONT1'
>> splot '$INFILE1'
>> unset table
>>
>> set cntrparam levels auto 5
>> set table '$TMPCONT2'
>> splot '$INFILE2'
>> unset table
>>
>> # Change single blank lines to double blank lines
>> !awk "NF<2{printf\"\n\"}{print}" <$TMPCONT1 >$TMPCONT1_1
>> !awk "NF<2{printf\"\n\"}{print}" <$TMPCONT2 >$TMPCONT2_1
>>
>> reset
>> set multiplot
>>
>> set pm3d interpolate 40,40 explicit map
>> #---plot contour labels using Petr Mikulik's script:
>> !awk -f label_contours.awk -v nth=40 center=1 textcolor=1 inclt=0 $TMPCONT1 >$TMPGP
>> load '$TMPGP'
>>
>> splot '$INFILE2' notitle with pm3d, \
>> '$TMPCONT1_1' notitle with lines lt -1, \
>> '$TMPCONT2_1' notitle with lines lc rgb "gray70"
>>
>>
>> Thanks!
>> Manfred
>>
>> ------------------------------------------------------------------------------
>> Learn Graph Databases - Download FREE O'Reilly Book
>> "Graph Databases" is the definitive new guide to graph databases and
>> their applications. This 200-page book is written by three acclaimed
>> leaders in the field. The early access version is available now.
>> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
>> _______________________________________________
>> gnuplot-beta mailing list
>> gnu...@li...
>> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
>>
>
|
|
From: Ethan M. <merritt@u.washington.edu> - 2013-05-08 23:00:33
|
On Wednesday, May 08, 2013 03:04:59 pm Manfred Schwarb wrote:
> Hi Ethan,
>
> Am 08.05.2013 18:17, schrieb Ethan Merritt:
> > On Wednesday, May 08, 2013 05:33:22 am Manfred Schwarb wrote:
> >> Hi,
> >>
> >> I tried to upgrade from gnuplot 4.4 to 4.6 and faced a new error
> >> in my plot script:
> >> "Tabular output of this 3D plot style not implemented"
> >>
> >> I read the release announcements but found no indication of some
> >> pm3d behaviour changes, so I'm quite baffled. Also searching the
> >> net did not reveal much useful information.
> >>
> >> So how is one supposed to use pm3d in gnuplot 4.6?
> >
> > Could you explain more clearly what you are trying to do?
>
> Which part of the example below is not clear? One surface plot (2D map)
> with contours, a second 2D map without surface but only contours,
> and corresponding contour labels.
It is not clear because it involves complicated scripts that don't work,
and does not include the associated data files.
So how am I to know what the intended result looks like?
For what it's worth, your script doesn't work for me when I try
it with gnuplot version 4.4.4 either, although the error message is
different:
$ gnuplot_4.4.4 schwarb.gp
** warning: can't use pm3d for 2d plots -- please unset pm3d
I can make it run by moving the second "set pm3d ..." command
5 lines down, to after the "load '$TMPGP'", but I don't know if
that's really what you intended. Perhaps you have a different
version of the label_contours.awk script than I do.
> But see below.
>
> > So far as I know, it is not necessary to use tabular output for
> > either pm3d or contour plots. Similarly the "set multiplot"
> > command in your script seems unnecessary.
> >
> > The simple answer would be:
> > reset
> > set contour
> > splot '$INFILE' with pm3d
> >
>
> Yes, this works perfectly if I have only one dataset and want to do
> a 2D map with contours.
>
> But I want to do two contour plots (2D map) in the same graph, one with colored
> surface plus grey contours, the other one with black contours without surface plotting
> using data from another source.
> So this can't be issued in one single splot command.
OK. That was not obvious from the commands you posted.
> Therefore you suggest to overlay multiple splot commands?
> set multiplot
> set contour
> splot '$INFILE1' notitle with pm3d lc rgb "grey"
> set view map
> unset surface
> splot '$INFILE2' notitle with lines lt -1
>
> This works, but I somehow can't paint the lines black, the "lt -1"
> seems ineffective (also lc rgb "grey" seems not to work).
> But then I have still the problem with the contour labels.
> I really have no idea how to produce them without using tables.
> Please enlighten me.
Let's set aside for the moment the question of how to change the
colors and labels used for contouring. It's worth a separate
discussion, but I think we can get you back on track without it.
Is it possible that the very first line of the script you posted
has crept in by error? If I comment out that line:
#set pm3d interpolate 2,2 implicit map
unset surface
... rest of script
then the script behaves the same for me in both gnuplot 4.4 and 4.6.
Maybe that's all you need to get past this problem.
> The really strange thing is, this worked perfectly, but then
> someone put in some "error: not implemented" statement.
> How could this be not implemented, if it worked perfectly before?
It was not implemented in version 4.4 either. The difference is
that version 4.4 failed to warn you that it couldn't handle
pm3d mode and silently ignored the "pm3d" keyword. Version 4.6
does warn you. Both 4.4 and 4.6 will dump the coordinates
identically if you simply say
set table FOO
splot '$INFILE1'
The change is that if you say instead
splot '$INFILE' with pm3d
it was handled in version 4.4 by silently ignoring the "with pm3d".
In version 4.6 you get an error message warning you that the
data generated by pm3d (interpolation/colors) cannot be saved
as tabular output.
Ethan
>
> Cheers,
> Manfred
>
>
>
> > Season to taste with your preferred pm3d or contour settings.
> > If there is some particular combination of settings that
> > causes a problem then maybe we can help with that.
> >
> > Ethan
> >
> >
> >
> >>
> >> I'd like to to some 2D maps with contours on top of it. My script
> >> looks roughly as follows:
> >>
> >>
> >> set pm3d interpolate 40,40 implicit map
> >> unset surface
> >> set contour
> >> set cntrparam bspline
> >> set cntrparam levels auto 10
> >> set table '$TMPCONT1'
> >> splot '$INFILE1'
> >> unset table
> >>
> >> set cntrparam levels auto 5
> >> set table '$TMPCONT2'
> >> splot '$INFILE2'
> >> unset table
> >>
> >> # Change single blank lines to double blank lines
> >> !awk "NF<2{printf\"\n\"}{print}" <$TMPCONT1 >$TMPCONT1_1
> >> !awk "NF<2{printf\"\n\"}{print}" <$TMPCONT2 >$TMPCONT2_1
> >>
> >> reset
> >> set multiplot
> >>
> >> set pm3d interpolate 40,40 explicit map
> >> #---plot contour labels using Petr Mikulik's script:
> >> !awk -f label_contours.awk -v nth=40 center=1 textcolor=1 inclt=0 $TMPCONT1 >$TMPGP
> >> load '$TMPGP'
> >>
> >> splot '$INFILE2' notitle with pm3d, \
> >> '$TMPCONT1_1' notitle with lines lt -1, \
> >> '$TMPCONT2_1' notitle with lines lc rgb "gray70"
> >>
> >>
> >> Thanks!
> >> Manfred
> >>
> >> ------------------------------------------------------------------------------
> >> Learn Graph Databases - Download FREE O'Reilly Book
> >> "Graph Databases" is the definitive new guide to graph databases and
> >> their applications. This 200-page book is written by three acclaimed
> >> leaders in the field. The early access version is available now.
> >> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> >> _______________________________________________
> >> gnuplot-beta mailing list
> >> gnu...@li...
> >> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
> >>
> >
>
>
--
Ethan A Merritt
Biomolecular Structure Center, K-428 Health Sciences Bldg
University of Washington, Seattle 98195-7742
|
|
From: Manfred S. <man...@gm...> - 2013-05-09 22:44:18
|
Am 09.05.2013 01:00, schrieb Ethan Merritt: > On Wednesday, May 08, 2013 03:04:59 pm Manfred Schwarb wrote: >> Hi Ethan, >> >> >> Which part of the example below is not clear? One surface plot (2D map) >> with contours, a second 2D map without surface but only contours, >> and corresponding contour labels. > > It is not clear because it involves complicated scripts that don't work, > and does not include the associated data files. > So how am I to know what the intended result looks like? > For what it's worth, your script doesn't work for me when I try > it with gnuplot version 4.4.4 either, although the error message is > different: > > $ gnuplot_4.4.4 schwarb.gp > ** warning: can't use pm3d for 2d plots -- please unset pm3d > > I can make it run by moving the second "set pm3d ..." command > 5 lines down, to after the "load '$TMPGP'", but I don't know if > that's really what you intended. Perhaps you have a different > version of the label_contours.awk script than I do. > Sorry, I did not remember any more that I had modified label_contours.awk by removing the END block, so only the labels are written. > > Is it possible that the very first line of the script you posted > has crept in by error? If I comment out that line: > #set pm3d interpolate 2,2 implicit map > unset surface > ... rest of script > > then the script behaves the same for me in both gnuplot 4.4 and 4.6. > Maybe that's all you need to get past this problem. > Well, I'm quite sure I simply copied some script I found on the net, and did not think too much about it. So classical cargo-culting. Perhaps the intention was to influence the contouring by setting the interpolate option, but this is not the case. Actually the "map" in the "set pm3d ..." makes the difference, when removing it, the plot works perfectly. But then, the remaining "set pm3d interpolate 40,40 implicit" seems without effect and can be removed, so yes, your suggestion is correct. As you told, the contouring is not influenced by pm3d settings, the trouble are the side effects of the "map" option, probably by setting "set style data pm3d" >> The really strange thing is, this worked perfectly, but then >> someone put in some "error: not implemented" statement. >> How could this be not implemented, if it worked perfectly before? > > It was not implemented in version 4.4 either. The difference is > that version 4.4 failed to warn you that it couldn't handle > pm3d mode and silently ignored the "pm3d" keyword. Version 4.6 > does warn you. Both 4.4 and 4.6 will dump the coordinates > identically if you simply say > set table FOO > splot '$INFILE1' > > The change is that if you say instead > splot '$INFILE' with pm3d > it was handled in version 4.4 by silently ignoring the "with pm3d". > In version 4.6 you get an error message warning you that the > data generated by pm3d (interpolation/colors) cannot be saved > as tabular output. OK, thanks for the explanation. The strange thing is however that set table FOO; splot '$INFILE' with pm3d gives a warning, but set pm3d implicit; set table FOO; splot '$INFILE' does not... Problem solved, thanks a lot! Manfred |