On Wednesday, 23 March, 2016 08:10:12 pl...@pi... wrote:
> Hi,
>
> I have been using some time data on x axis and the last xtic label is
> running outside the graph.
>
> If I set xtics rotate by -90 it all lines up nicely , but using rotate 0
> or rotate -45 mean I lose half the last tick label which looks very
> messy and is not publishable.
>
> The clear space to the right of the graph ( no y2 stuff ) seems to be
> totally unaffected by the label orientation.
>
> Now I am aware that there are fundamental issues with getting text
> dimensions back from many termainals which means that text extents are a
> bit of guesswork and always inaccurate. However, this looks like the
> horizontal text extent of the last tic label is not even being used.
>
> Shouldn't this be calculated in the usual approximative way to ensure
> that it does not disappear?
As usual it would help a lot if you tell us which gnuplot version
and in particular which terminal type you are using.
The short answer is that the program already does what you suggest,
subject to the limitations of estimating the true space required by
text in the current font. Attached is an example taken from the demo
"histograms.dem" showing two versions of the plot that differ only in the
xtic rotation angle. As you can see, both the bottom and the right side
margins shift to accommodate the xtic label text according to the rotation.
If I increase the font size (e.g. "set xtics font ',20'" then the
program underestimates the space required for the tic labels because
it assumes all text in the plot uses the font size specified by "set term".
But in your case you say the layout is "totally unaffected".
I cannot explain or reproduce that.
Ethan |