|
From: Ethan A M. <sf...@us...> - 2013-10-08 22:42:54
|
On Tuesday, 08 October, 2013 23:01:33 Mojca Miklavec wrote: > Dear developers, > > I have just noticed the nice enhancement in gnuplot, defaulting to a > proper exponential form for numbers. However I have a tiny request. > > I always use \cdot instead of \times. Would it be possible to make > this configurable? Yes. On the non-LaTeX side %h differs from %H by the choice of "x" versus ""*". It would make sense on the LaTeX side to interpret this as \times versus \cdot. Obviously only one of these can be the default. If you want something other than the default you have to use the "set format" command. > This is the line in src/util.c that prints the character: > strcpy(&tmp2[j], "\\times"); > > The other "problem" I have if I would use this handy shortcut is that > it annoys me to have the y axis labelled "1", "1.5", "2", "2.5", ... > Thus I always use something like > set format y "%.1f" That was one of two issues I had with the patch also. See discussion attached to the patch tracker. https://sourceforge.net/p/gnuplot/patches/637/ IMHO "%.1f" isn't quite right either. I prefer set format "%.1tx10^{%T}" The other side of the argument, and the rationale for the patch as written, is Craig DeForest's observation that some people actually like the %g format. That seems fair enough. I just don't happen to be one of those people. So %h is a variant of %g with improved markup. Arguably there is also room for a variant of %f with improved markup. > I tried if I could use the same notation, "%.1h", but this only leads > to the undesired removal of dollar signs around the numbers (without > the desired effect), so I get: > 2\times10^{43} > Is this removal of dollar signs intended? Yes. The dollar signs are only added automatically in the case of using the default format, so that the default state works for both LaTeX and non-LaTeX terminals. If you are going to the trouble of specifying an explicit "set format FOO" command then it's up to you to add whatever additional markup is needed, including dollar signs. > I would really love to have a setting to turn on the functionality > that would automatically calculate the number of needed decimal places > and keep it constant on the whole axis. And possibly a similar setting > that would also stick with 1.0\times10^{0} to keep the numbers nicely > right-aligned when requested. See discussion. I'd like that also, but it would require choosing the format at the level of the entire axis range, not tic-by-tic. > But if %h is available it would be really nice if it would at least > allow the explicit "%.<number>h". That doesn't work for %h exactly because it doesn't work for %g. Ethan |