How to edit the legend of a plot

ChristianKehrer
ChristianKehrer Altair Community Member
edited October 2020 in Community Q&A

Dear Compose experts,

 

is there a way to edit the legend of a plot in compose, i.e. position and font size?

As far as I know, for the position something like the following works:

legend('Location', 'northeast') oder legend('Location', 'northwest')

 

...but, what about the size?

 

Thank you in advance for your help!
Christian

Tagged:

Answers

  • Priyanka_N
    Priyanka_N
    Altair Employee
    edited May 2019

    Hi Christian,

     

    To edit the legend font size, you must right click on the legend and change the font size.

    hope this helps you.

     

    Thanks,

    Priyanka N

     

     

  • ChristianKehrer
    ChristianKehrer Altair Community Member
    edited May 2019

    Thank you, Priyanka!

     

    Meanwhile, I found a second option as follows:

    set (get(gca, 'xlabel'), 'fontsize', 14);

     

    Best

    Christian