[Scilab-users] [Posible FRAUDE] Re: Fwd: problem with subplot

Federico Miyara fmiyara at fceia.unr.edu.ar
Fri Jul 16 06:56:01 CEST 2021


One more detail: if the ylabel of one of the plots is not required, the 
graph doesn't extend towards the left but has the same width as the 
others. This is what one would expect from the use of xlabel: its 
presence or absence shouldn't affect the height of the plot relative to 
the other plots.

Federico


On 15/07/2021 21:47, Federico Miyara wrote:
>
> Philipp,
>
> Thanks! That's the reason indeed!
>
> The workarounds do work but with pitfalls. With xstring() the label 
> moves around when zooming in or out, and xlabel takes too much space, 
> in fact saving space was the reason to place it only on the last plot.
>
> Probably it would be possible to adapt the coordinates x, y for 
> xetring to the bounds of the axes, but I'm not sure the positions 
> would be updated when interactively zooming.
>
> The desired behavior would be that by default all plots would be the 
> same size or that it would be possible to place a label relative to a 
> figure
>
> Regards,
>
> Federico
>
>
> On 15/07/2021 04:02, P M wrote:
>>
>> Hi Federico,
>>
>> my best guess:   In your example only subplot(4,1,4) gets the x_label
>> Since this needs space, the diagram is smaller.
>>
>> Workaround:    create label for x-axis via xstring
>>
>> Or:
>>
>> Assign a x_label for each subplot, but hide it.
>> This will assign "space" for the label, but it won't be 
>> displayed...hence all diagrams should look the same...
>>
>> x  =  linspace(0,2*%pi,1000)
>> y  =  sin(x)
>> f  =  figure();
>> f.background  =  8;
>>
>> for  i  =  1:4
>>      subplot(4,1,i)
>>      plot(x,y);
>>      a  =  gca();
>>      a.x_label.text  =  't';
>>      a.x_label.visible  =  'off';
>> end
>> a.x_label.visible  =  'on';
>> Best Regards,
>> Philipp
>>
>>
>>
>>
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> 
> 	Libre de virus. www.avast.com 
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> 
>
>
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



-- 
El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20210716/2826d8f5/attachment.htm>


More information about the users mailing list