[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuplot-info-beta
Subject:    Re: New patch set for beta 347
From:       David Denholm <daved () ctxuk ! citrix ! com>
Date:       1998-07-16 18:14:02
[Download RAW message or body]


> 
> David Denholm <daved@ctxuk.citrix.com> wrote:
> 
> > Introducing a titleonly into the plot line means that one has
> > to specify a completely redundant function plot just so that
> > one can specify the title.
> > 
> > 
> > 
> > If we accept that this syntax is just a stop gap until, for
> > example, we actually support '\n' in the title, then there
> > is an alternative formulation for the workaround which
> > may have a less pervasing effect on the syntax. (Working on
> > the basis that any syntax supported in any release ought to
> > be supported evermore, and if we intend dropping it soon, we
> > shouldn't be introducing it.)
>  
> I agree that newline in a title is the best solution for the long run.
> I also agree that whatever stopgap we adopt should do minimal damage
> to the syntax.
>  
> > Anyway, getting to the point, an alternative formulation might
> > be to invent an invisible plot style.
> 
> Doesn't "plot ... with nothing" also require an otherwise redundant plot
> also, just like "titleonly"?

Yes, but (IMHO)  plot ... with nothing   is slightly more explicit that
this is how it is working internally. (Not necessarily a good thing of
course. But I often find that when one is explicit and simple minded
about the implementation, people find other uses for it)

> 
> Incidently, after I posted that patch, Stefan suggested that "nosample"
> might be a better keyword.  I'm not sure ... "notitle" eliminates the
> entire entry, rather than just the text.  Better (IMHO) would be three
> options: "notitle" to mean no text, "nosample" to mean no sample, and
> "noentry" or "nokey" to mean neither text nor sample.  But that changes
> the meaning of "notitle", of course -- not good.

I agree that nosample is a separate, potentially useful, attribute
for a plot.

It would be nice if  title ''  meant an empty string for the title
(but still make a key entry with a sample), and was different
from notitle. But we can't change such things :-(

We could introduce  nokey  and encourage its use instead of notitle,
perhaps..?

> 
> [snip]
> 
> > I submit that this may have less far-reaching impact in the future ?
> > (The obvious implementation will be less efficient, but there
> >  won't be a lot of code to touch. In fact, it may come virtually
> >  free since a plot style of '0' internally may already do the
> >  'nothing' plot style..?  My memory is failing I'm afraid...)
> 
> Let's see ... on my x11 box "plot ... w 0" gives an error message,
> "plot ... w l 0" gives a dotted line.  Did you mean something else?

Sorry, what I meant was that the internal representation of the
plot styles uses the bottom two bits to flag points and lines.
So an internal value of 0 means neither lines nor points,
and then with no special case code to do anything else, nothing
at all is drawn.

> 
> > (Apologies to Dick for not suggesting this in a more timely fashion
> >  to save work...)
> 
> Actually, from the length of the patch you posted that implements
> "plot ... with nothing", I'd guess that both methods require about
> the same amount of work -- which isn't really very much anyway :-)

Agreed  (I had to touch more files to add conversion of string to
internal plot style and vice versa)

> 
> 
> Another option would be to introduce a null line style.  "0" is used
> for dotted lines (for things like zeroaxes) and "-1" is used for thick
> border lines; how much trouble would it be to use "-2" for no line at
> all?  Unfortunately I think this would require either modifying every
> terminal driver or every line-drawing call to a driver, which would be
> an inordinate amount of work.  So I'll cast my vote for "plot ...  with
> nothing", on the grounds that it doesn't change the existing options on
> "plot" as much as does "titleonly".
> 


Agreed again : long term, the user will be able to define the
'nothing' line style without our having to make it for them !
[dashed line with ratio of 0, or something like that]



dd
-- 
David Denholm            daved@ctxuk.citrix.com
Citrix Systems UK Ltd.   http://www.citrix.com/



[[[[ unsubscribe from info-gnuplot-beta via majordomo@dartmouth.edu ]]]]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic