help-octave
[Top][All Lists]
Advanced

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

Re: subplot titles and labels overlap


From: Bob Odom
Subject: Re: subplot titles and labels overlap
Date: Wed, 21 Sep 2011 14:31:49 -0700 (PDT)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)



On Wed, 21 Sep 2011, Philip Hahn wrote:



On Wed, Sep 14, 2011 at 4:21 PM, Ben Abbott <address@hidden> wrote:

On Sep 14, 2011, at 1:47 PM, Philip Hahn wrote:

> Greetings,
>
> I have 3 subplots and the titles/labels overlap in the plot output and when
printed. Is there any way to specify additional padding to avoid this overlap?
Sample code below:
>
> thanks,
>
> philip
>
> (create any function x,y,t with abscissa dx,dy,dt)
>
> % plot
>
> subplot(3,1,1);
>
>     p=plot(dx, x);
>     set(gca,'FontSize',18);
>     set(p,'LineWidth',2);
>     axis([0,0.05]);
>     xlabel('x/D');
>     ylabel('R(x,x+r)');
> %    title(strcat('Two-Point Correlation ', char(label(ind)), ' 
protuberance.'));
>
>
> subplot(3,1,2);
>
>     p=plot(dy, y);
>     axis([-0.06,0.06]);
>     set(gca,'FontSize',18);
>     set(p,'LineWidth',2);
>     xlabel('y/D');
>     ylabel('R(y,y+r)');
> %    title(strcat('Two-Point Correlation ', char(label(ind)), ' 
protuberance.'));
>
>
> subplot(3,1,3);
>
>     p=plot(dt(1:50), t(1:50));
>
>     set(gca,'FontSize',18);
>     set(p,'LineWidth',2);
>     axis([0,0.0001]);
>     xlabel('t');
>     ylabel('R(t,t+\tau)');
> %    title(strcat('Autocorrelation ', char(label(ind)), ' protuberance.'));
>
>     print('-dpng',strcat('TPCxyz',char(prefixy(ind)),'.png'));
> end

You can adjust the position of each axes by modifying their "position" property.

If you are running Octave 3.4.x, this is done automatically using the native
backend. Before running your script just ....

       graphics_toolkit fltk
       close all

... and then run your plot commands.


Ben,

 I reinstalled 3.4.2 with FLTK. I can issue the command "graphics_toolkit fltk" 
without a
problem.

 The plots look great in the plot window

 however when I go to print using -dpng or -djpeg I get the following error:

warning: print.m: epstool binary is not available.
Some output formats are not available.
warning: print.m: fig2dev binary is not available.
Some output formats are not available.
warning: print.m: pstoedit binary is not available.
Some output formats are not available.
error: `__fltk_redraw__' undefined near line 30 column 3
error: called from:
error:   /usr/local/share/octave/3.4.2/m/plot/__fltk_print__.m at line 30, 
column 3
error:   /usr/local/share/octave/3.4.2/m/plot/print.m at line 382, column 12
error:   /media/NEW VOLUME/PhD/data/TwoPointCuts/threepane.m at line 85, column 
2


 Any advice? Did I miss a library or configuration option on install?

 Thanks,

philip
 
      Ben





You need to install: epstool, pstoedit, and fig2dev

reply via email to

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