[scilab-Users] Re: Multiple plots above each other with common x-axis

Petar Knezevich petar.knezevich at gmail.com
Tue May 18 12:15:51 CEST 2010


Hi Samuel,

Thank you for the advice.  I used this technique to bring the subplots
closer together.  Along with setting the axis properties to turn off
the x-label on the upper graphs this produces what I wants.

See the attached files for my example.  I need some more adjustments
to stop the legends from overlapping data but it is almost done.

If I re-use this method frequently I will think about turning it into
a template or possible automating it.

Regards,
Petar

On 17 May 2010 21:43, Samuel Gougeon <Samuel.Gougeon at univ-lemans.fr> wrote:
> Hello,
>
> ----- Message d'origine -----
> De : Petar Knezevich
> Date : 17/05/2010 13:39:
>>
>> Hi,
>>
>> Is it possible to stack multiple plots on top of each other with no
>> vertical space between them and display the x-axis only on the bottom
>> plot?  I would like to combine any number of plots in this manner
>> (e.g. 2, 3, 4 or 5 plots).
>>
>> --------------------
>> |      plot 1     |
>> |                   |
>> --------------------
>> |      plot 2     |
>> |                   |
>> --------------------
>> Common X-Axis
>>
>
> Yes it is
>>
>> Is there already an option in subplot to produce this result?
>> Currently I use a standard subplot configuration but there is too much
>> space between each plot.
>>
>
> Yes, subplot() is not dedicated to this task. There are several ways
> to do what you whish. One of the easiest and most straightforward one
> is to fit the .axes_bounds property by hand. Here is the most simple
> example i may propose to you:
>
> plot() // plots a sample with 2 subplots
> a=gca(); // gets the handle of the last plot
> twinkle(a) // to see which one was the last plotted
> a.axes_bounds=[0 0.41 1 0.55 ];
>
> You can even share a common X axis within different plots, etc.
>
> To know more about possibilities, see as a starting point: help
> axes_properties
> and display the handle:
> a  <return>
>
> Regards
> Samuel
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Simulation Data.zip
Type: application/zip
Size: 177339 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20100518/ba38ab7b/attachment.zip>


More information about the users mailing list