Forum: Scilab Users' Group: title of upper subplots partially covered by window frame Search ForumsForums RSS

1/4/2011 at 5:49:20 PM GMT
Posts: 57

Subject: title of upper subplots partially covered by window frame
Hello Scilab community,
How can I shift a row of subplots downwards a bit to avoid covering half of their titles  by the upper graphic window frame?
Kind regards
Jens
1/4/2011 at 6:15:42 PM GMT
Posts: 226

Subject: RE: title of upper subplots partially covered by window frame
J. Strom said:
Hello Scilab community,
How can I shift a row of subplots downwards a bit to avoid covering half of their titles  by the upper graphic window frame?
Kind regards
Jens

I made a 2x2 sub-plot example and had problems with titles having fonts greater than size 5.

Here are a couple of suggestions

1. Keep your font size small enough not to be obscured.  Admittedly not a great suggestion ...

2.  Use the 'position' option and move the title to a new location.
Example: title('Here is my title','color','blue,fontsize','10,'position,'[ 10 2])

You will find that you can put the tites just about anywhere you want them.
Last edited on 1/4/2011 6:17:57 PM GMT
1/4/2011 at 8:01:57 PM GMT
Posts: 57

Hallo David,
Thanks for your fast response. "position" works well with "plot". I forgot to mention that my subplots are not "plot" but "plot2d3".
The "title" object as a child of  "axes" is 2D.  This holds also for xtitle. Attempts to change the position property leads to no title at all for "plot2d3". So I still have no solution. Perhaps you know another way?
Kind regards
Jens
1/4/2011 at 8:42:15 PM GMT
Posts: 226

Subject: RE:
J. Strom said:
Hallo David,
Thanks for your fast response. "position" works well with "plot". I forgot to mention that my subplots are not "plot" but "plot2d3".
The "title" object as a child of  "axes" is 2D.  This holds also for xtitle. Attempts to change the position property leads to no title at all for "plot2d3". So I still have no solution. Perhaps you know another way?
Kind regards
Jens

We will look into it.  I suspect if the title disappears when the position is used, it is a syntax error somewhere.  An example would be helpful.

Another idea is to use a caption instead of a title.

Last edited on 1/4/2011 8:43:37 PM GMT
1/4/2011 at 9:33:30 PM GMT
Posts: 57

This is my mini example:

xdel();
for i=1:2
subplot(5,7,i)
x=[0 1;0 1]; y=[1 1;0 0]; z=[0 0;0 0]
plot3d2(x,y,z)
end

My output shows the lower half of 'headline' only.

'caption' seems to be only 2D too.

Kind regards
Jens
1/4/2011 at 12:58:59 AM GMT
Posts: 226

Here is a old bug report on this item   (7906).

We are working on some crazy work-a-rounds (like rotating the plots 90 degrees)

Last edited on 1/5/2011 1:08:04 AM GMT
1/4/2011 at 4:24:39 AM GMT
Posts: 47

Hi! Try to use Axes properties - margins, by increasing a little bit top margin can fix situation. Here is add on to sample code:

xdel();
for i=1:2
subplot(5,7,i)
x=[0 1;0 1]; y=[1 1;0 0]; z=[0 0;0 0]
plot3d2(x,y,z)
a=gca(); a.margins=[0.125 0.125 0.2 0.125];
end

Last edited on 1/5/2011 5:02:17 AM GMT
1/6/2011 at 10:56:26 AM GMT
Posts: 57

Hi Alex,

margins( ) does the trick. Thank you very much!

The command has not been in my supply up to now. Good to have this forum.

Kind regards
Jens
Community Search