[Scilab-users] rotate x_tick labels

classic Classic list List threaded Threaded
4 messages Options
der_Phil der_Phil
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] rotate x_tick labels

Dear all,

how can one insert the values of a string vector into a latex-formatted string?

Example:

myLabels = [ 'label1'; 'label2'; ....; label_n];   // myLabels = vector of strings

I am struggling by trying to use the entries of myLabel as automatic generated LaTex-labels for x_ticks.
for i = 1: nrOfLabels
    str = myLabels(i);
    a.x_ticks.labels(i)="$\rotatebox{90} {str}$";   // this will write "str" in latex format and 90° rotated to each label position
end
Of course it is possible to type {str} by hand for each label.
But as the labels might change from plot to plot this is not really an option.
Any idea?

Thank you,
Philipp


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
amonmayr amonmayr
Reply | Threaded
Open this post in threaded view
|

Re: ?==?utf-8?q? rotate x_tick labels

Hello,

a.x_ticks.labels(i)="$\rotatebox{90} {"+str+"}$";
 
should work.

Antoine
 
Le Jeudi, Octobre 17, 2019 15:40 CEST, P M <[hidden email]> a écrit:
 

> Dear all,
>
> how can one insert the values of a string vector into a latex-formatted
> string?
>
> Example:
>
> myLabels = [ 'label1'; 'label2'; ....; label_n];   // myLabels = vector of
> strings
>
> I am struggling by trying to use the entries of myLabel as automatic
> generated LaTex-labels for x_ticks.
>
> for i = 1: nrOfLabels
>     str = myLabels(i);
>     a.x_ticks.labels(i)="$\rotatebox{90} {str}$";   // this will write
> "str" in latex format and 90° rotated to each label positionend
>
> Of course it is possible to type {str} by hand for each label.
> But as the labels might change from plot to plot this is not really an
> option.
> Any idea?
>
> Thank you,
> Philipp

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
amonmayr amonmayr
Reply | Threaded
Open this post in threaded view
|

Re: ?==?utf-8?q? rotate x_tick labels

In reply to this post by der_Phil
Houps,

I meant:

a.x_ticks.labels(i)="$\rotatebox{90} {"+myLabels+"}$";  
 
Antoine
 
Le Jeudi, Octobre 17, 2019 15:40 CEST, P M <[hidden email]> a écrit:
 

> Dear all,
>
> how can one insert the values of a string vector into a latex-formatted
> string?
>
> Example:
>
> myLabels = [ 'label1'; 'label2'; ....; label_n];   // myLabels = vector of
> strings
>
> I am struggling by trying to use the entries of myLabel as automatic
> generated LaTex-labels for x_ticks.
>
> for i = 1: nrOfLabels
>     str = myLabels(i);
>     a.x_ticks.labels(i)="$\rotatebox{90} {str}$";   // this will write
> "str" in latex format and 90° rotated to each label positionend
>
> Of course it is possible to type {str} by hand for each label.
> But as the labels might change from plot to plot this is not really an
> option.
> Any idea?
>
> Thank you,
> Philipp

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
der_Phil der_Phil
Reply | Threaded
Open this post in threaded view
|

Re: ?==?utf-8?q? rotate x_tick labels

Dear Antoine,
that does it.
Thank you,
Philipp

Am Do., 17. Okt. 2019 um 18:49 Uhr schrieb Antoine Monmayrant <[hidden email]>:
Houps,

I meant:

a.x_ticks.labels(i)="$\rotatebox{90} {"+myLabels+"}$"; 

Antoine

Le Jeudi, Octobre 17, 2019 15:40 CEST, P M <[hidden email]> a écrit:

> Dear all,
>
> how can one insert the values of a string vector into a latex-formatted
> string?
>
> Example:
>
> myLabels = [ 'label1'; 'label2'; ....; label_n];   // myLabels = vector of
> strings
>
> I am struggling by trying to use the entries of myLabel as automatic
> generated LaTex-labels for x_ticks.
>
> for i = 1: nrOfLabels
>     str = myLabels(i);
>     a.x_ticks.labels(i)="$\rotatebox{90} {str}$";   // this will write
> "str" in latex format and 90° rotated to each label positionend
>
> Of course it is possible to type {str} by hand for each label.
> But as the labels might change from plot to plot this is not really an
> option.
> Any idea?
>
> Thank you,
> Philipp

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users