help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scaling distance between xlabel/ylabel and axes


From: Ben Abbott
Subject: Re: Scaling distance between xlabel/ylabel and axes
Date: Thu, 21 Oct 2010 08:24:57 +0800

On Oct 21, 2010, at 5:37 AM, Tobias Schmid wrote:

>  Hello, 
> 
> I've got a question concerning the location of the xlabel/ylabel and the 
> spacing between the entries of the legend. 
> 
> I tried to enlarge the font of the xlabel, but for a certain point of size, 
> the label overlap with the labels of the xTicks. The identical thing happens 
> with the yTicks and the ylabel. 
> 
> And for the lengend, the font of the entries overlaps as well, if I've 
> reached a certain point of size. 
> 
> Is there a way to solve this problem? 
> 
> This is the code I use: 
> 
> set(ak, 'XLim',[-500000, 500000]); 
> %set(ak, 'XTick',[-60,-50,-10,0,10]); 
> 
> %set(ak, 'YLim', [-60,10]); 
> set(ak, 'XTick',[-500000,-400000,-195312,0, 195312,400000,500000]); 
> 
> set(ak, 'FontSize', 28) 
> set(get(ak, 'XLabel'), 'FontSize', 28); 
> set(get(ak, 'YLabel'), 'FontSize', 28); 
> legend(ak ,'{\fontsize{18} LegendeStelleEins}' , '{\fontsize{18} 
> LegendeStelleZwei}' , 'Location','South') 
>  xlabel('xPlatzhalter') 
>  ylabel('yPlatzhalter') 
> 
> Or if the distance between axes and xlabel doesn't scale automaticly, is 
> there a way to change the position by hand? 
> I hope this question isn't that trivial. I'm very new in using octave and I 
> didn't find a solution anywhere else. 
> 
> Best regards, 
> 
> Tobias

The problem is that the spacing around the axes labels, tick labels, and legend 
is determined by the fontsize specified when the gnuplot terminal is initially 
set.

This was not done properly for the current releases, but has been fixed in the 
developers sources.

I don't know how to fix the problem in a convenient way. If you're interested 
in fixing the problem for a specific plot, then you can output the gnuplot 
plotstream to a file such as "debug.gp" below.

        drawnow ("x11", "/dev/null", false, "debug.gp")

Then edit the plot stream to change the set terminal command to include a font 
specification, and finally load the steam into gnuplot. If that will meet your 
needs, let me know and I can give more detail.

Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]