A key sample for pm3d surfaces?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

A key sample for pm3d surfaces?

Daniel J Sebald
I'm trying to add a key sample for a pm3d surface.  I know there is the
color box and all, but it seems odd that there can be a title entry in
the key but no sample.  I can sort of kludge a solution by leaving the
surface title empty and then create a bogus line with NaN's that will
contain the sample and title, linewidth 8.  For the Qt terminal, the
default is rounded line ends so the key sample at linewidth 8 is round.

Basically, it would be nice to have a sample entry for surface similar
in appearance to the filledcurve or candlestick of 2D plots.  I wonder
if it would make sense to have a "sample" descriptor in plot/splot lines
similar to the "title" descriptor.

Dan

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
gnuplot-beta mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
Reply | Threaded
Open this post in threaded view
|

Re: A key sample for pm3d surfaces?

sfeam
On Thursday, 07 July, 2016 12:19:21 Daniel J Sebald wrote:

> I'm trying to add a key sample for a pm3d surface.  I know there is the
> color box and all, but it seems odd that there can be a title entry in
> the key but no sample.  I can sort of kludge a solution by leaving the
> surface title empty and then create a bogus line with NaN's that will
> contain the sample and title, linewidth 8.  For the Qt terminal, the
> default is rounded line ends so the key sample at linewidth 8 is round.
>
> Basically, it would be nice to have a sample entry for surface similar
> in appearance to the filledcurve or candlestick of 2D plots.  I wonder
> if it would make sense to have a "sample" descriptor in plot/splot lines
> similar to the "title" descriptor.

The problem with using a colored key sample for anything with pm3d
coloring (surfaces or anything else) is that it is not clear how to
choose a color for the sample.   You might for example have 3 plots
in a single figure using the same pm3d palette, one plot predominantly
green, one predominantly blue, and one predominantly yellow.
You would like the key to match, but how would the program know this?

        Ethan


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
gnuplot-beta mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
Reply | Threaded
Open this post in threaded view
|

Re: A key sample for pm3d surfaces?

Daniel J Sebald
On 07/07/2016 01:53 PM, Ethan A Merritt wrote:

> On Thursday, 07 July, 2016 12:19:21 Daniel J Sebald wrote:
>> I'm trying to add a key sample for a pm3d surface.  I know there is the
>> color box and all, but it seems odd that there can be a title entry in
>> the key but no sample.  I can sort of kludge a solution by leaving the
>> surface title empty and then create a bogus line with NaN's that will
>> contain the sample and title, linewidth 8.  For the Qt terminal, the
>> default is rounded line ends so the key sample at linewidth 8 is round.
>>
>> Basically, it would be nice to have a sample entry for surface similar
>> in appearance to the filledcurve or candlestick of 2D plots.  I wonder
>> if it would make sense to have a "sample" descriptor in plot/splot lines
>> similar to the "title" descriptor.
>
> The problem with using a colored key sample for anything with pm3d
> coloring (surfaces or anything else) is that it is not clear how to
> choose a color for the sample.   You might for example have 3 plots
> in a single figure using the same pm3d palette, one plot predominantly
> green, one predominantly blue, and one predominantly yellow.
> You would like the key to match, but how would the program know this?

That's a good example of the use.  As a default, key sample is sort of
meaningless for surfaces--I suppose something like average color might
show predominant color and somehow make surfaces distinct.  The default
could be blank, but I was thinking something that the user could
specify, e.g.,

   plot 'foo.dat' with pm3d title 'green component' sample rgb 'green'

where sample for pm3d would be have FILLSTYLE bit set so that it comes
out as a patch rather than a line.  I've kind of achieved this with an
extra bogus line of width 11 to contain the title.  It's roughly the
same size as a key sample patch.

Dan

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
gnuplot-beta mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
Reply | Threaded
Open this post in threaded view
|

Re: A key sample for pm3d surfaces?

Daniel J Sebald
On 07/07/2016 02:33 PM, Daniel J Sebald wrote:

> On 07/07/2016 01:53 PM, Ethan A Merritt wrote:
>> On Thursday, 07 July, 2016 12:19:21 Daniel J Sebald wrote:
>>> I'm trying to add a key sample for a pm3d surface.  I know there is the
>>> color box and all, but it seems odd that there can be a title entry in
>>> the key but no sample.  I can sort of kludge a solution by leaving the
>>> surface title empty and then create a bogus line with NaN's that will
>>> contain the sample and title, linewidth 8.  For the Qt terminal, the
>>> default is rounded line ends so the key sample at linewidth 8 is round.
>>>
>>> Basically, it would be nice to have a sample entry for surface similar
>>> in appearance to the filledcurve or candlestick of 2D plots.  I wonder
>>> if it would make sense to have a "sample" descriptor in plot/splot lines
>>> similar to the "title" descriptor.
>>
>> The problem with using a colored key sample for anything with pm3d
>> coloring (surfaces or anything else) is that it is not clear how to
>> choose a color for the sample.   You might for example have 3 plots
>> in a single figure using the same pm3d palette, one plot predominantly
>> green, one predominantly blue, and one predominantly yellow.
>> You would like the key to match, but how would the program know this?
>
> That's a good example of the use.  As a default, key sample is sort of
> meaningless for surfaces--I suppose something like average color might
> show predominant color and somehow make surfaces distinct.  The default
> could be blank, but I was thinking something that the user could
> specify, e.g.,
>
>     plot 'foo.dat' with pm3d title 'green component' sample rgb 'green'
>
> where sample for pm3d would be have FILLSTYLE bit set so that it comes
> out as a patch rather than a line.  I've kind of achieved this with an
> extra bogus line of width 11 to contain the title.  It's roughly the
> same size as a key sample patch.

Actually, the most general key sample has a fill color/pattern and an
outline.  For example the third demo plot in 'violinplot.dem' (titled
"Same data - kernel density") has samples where the fill color and
outline match that of the filled curves on the plot.  Right now a
mesh/pm3d are separate entities even though a lot of the example plots
mimic a mesh will fill by plotting the same function with different
styles.  So there is no way of achieving the same sort of key sample in
3D that filledcurves is doing in 2D... unless having a manual key sample
control (short term), or generalizing "lines" in splot to "mesh" (long
term).

Dan

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
gnuplot-beta mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta