|
From: Ethan A M. <merritt@u.washington.edu> - 2013-10-21 21:40:09
|
On Monday, 21 October, 2013 16:19:48 Allin Cottrell wrote:
> I'm wondering when this changed, and whether the change was intentional:
> it used to be that if you did, say,
>
> set title 'Under_score'
>
> then (at least when using the wxt and x11 terminals) the text came out
> shown, with an underscore. Now (recent CVS[*]) The underscore produces a
> subscript 's' (in wxt and x11).
Recent cvs defaults to enhanced text mode.
We can discuss whether this is a good thing or a bad thing, or a good thing
thing in principle that needs adjustment in practice.
This is not the sort of change in expectations that would be acceptable within
a minor version series (4.2 4.4 4.6) but seems to me OK to explore as we
head towards a major version 5 release.
The motivation for the change was to support "prettier" default formats for
axis tic labels. The new default format " %h" produces, for example,
1.2 x 10^6 as a label rather than 1.2e06
See discussion here:
https://sourceforge.net/p/gnuplot/patches/637/
and here
https://sourceforge.net/mailarchive/message.php?msg_id=31498730
It seemed kind of pointless to change the default format without also
enabling the enhanced text mode needed to produce it.
The enhanced/noenhanced attribute can still be applied to everything
e.g. set termoption noenhanced
or to an individual plot element
e.g set title "under_score" noenhanced
Some plot elements have always defaulted to noenhanced and continue
to do so. For instance autogenerated key entries default to noenhanced
so as to preserved underscores in a file name or function name.
Other plot elements, like "set title", have always defaulted to enhanced,
though of course this doesn't actually take effect unless enhanced text
mode is globally enabled.
I would have thought that underscores in user-supplied titles and labels
were more likely to be intended as subscripts than literals, but I could be wrong.
What would you prefer?
Revert the change in default terminal setting?
Revert the default state of just the "set title" command?
More obvious warnings that something has changed?
Some other combination?
FWIW, I've just noticed that the enhanced/noenhanced attribute of the
plot title is sticky, but which I mean that it isn't touched by a "reset" command.
>From the perspective of 4.6, that's a bug.
>From the perspective of your query, maybe it's a feature :-)
That is, you could put "set title noenhanced" in ~/.gnuplot and for your
own sessions it would always be that way unless explicitly changed.
> It seems to me that it's more intuitive to
> have to do something special to get a superscript than having to do
> something special to get an underscore when you want one.
Perhaps. I don't think it is intrinsically more or less intuitive than having to
escape backslashes, tabs, dollar signs, etc. It's just a matter of what you
are expecting.
Ethan
|