[Scilab-users] Ticks labels in form of number above number

Izabela Wójcik-Grząba iwoj at il.pw.edu.pl
Thu Feb 21 18:08:00 CET 2019


Thank you very much Samuel. Now the solution is obvious. Sometimes these 
are the hardest to find :-)

Iza




W dniu 21.02.2019 17:48, Samuel Gougeon napisał(a):
> Hello Izabela,
> 
> Le 21/02/2019 à 17:38, Izabela Wójcik-Grząba a écrit :
> 
>> Hello,
>> 
>> In my plot every tick_label in the x-axis is made of two numbers
>> (the second is in the parenthesis). Now they are printed next to
>> each other like for example:
>> 0.2 (11)
>> 
>> See the code below:
>> 
>> f_l=[0.20030479
>> 0.29234647
>> 0.36879976
>> 0.43788566
>> 0.50263554
>> 0.56453135
>> 0.62441298];
>> 
>> L_0=[11:1:17]';
>> 
>> f_l_labels=[msprintf('%3.1f\n',f_l)+' ('+string(L_0)+')'];
>> 
>> In this form they take a lot of place along the x-axis, so I would
>> like to print the numbers one over another. I've tried different
>> options but none of them works. Particularly I was testing a Latex
>> option \atop but with no success.
> 
> You must double "\":
> 
> --> f_l_labels=[msprintf('$%3.1f\\ATOP\n',f_l)+' ('+string(L_0)+')$']
>  f_l_labels  =
> !$0.2\atop (11)$  !
> !$0.3\atop (12)$  !
> !$0.4\atop (13)$  !
> !$0.4\atop (14)$  !
> !$0.5\atop (15)$  !
> !$0.6\atop (16)$  !
> !$0.6\atop (17)$  !
> 
> then it should work:
> 
> Best regards
> Samuel
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



More information about the users mailing list