parallelplot and latex interpreter

5 visualizaciones (últimos 30 días)
Rub Ron
Rub Ron el 11 de Mzo. de 2023
Comentada: Benjamin Kraus el 13 de Feb. de 2024
I am using parallelplot to generate some plots. However, when I used:
set(gca,'TickLabelInterpreter','latex');
I get:
Unrecognized property TickLabelInterpreter for class ParallelCoordinatesPlot.
Is there any alternative to set the x and y labels of my plot to latex style?
Example:
data = randi(1,10,3);
p = parallelplot(data)
p.CoordinateTickLabels = {'one','two','three'};
set(p,'TickLabelInterpreter','latex');
  5 comentarios
Rub Ron
Rub Ron el 14 de Abr. de 2023
@Adam Danz, Hi, I try to use the answer of @LR_eng, converting the parallel plot into a struct variable. It works for the XTickLabel, but then when I try to save the figure it go back to the previous ticks. You suggested here to use:
S.AutoListeners__{1}.Enabled = false
However, even using it, the figure go backs to the previous ticks. May you have any suggestion? Thanks in advance for your time.
Adam Danz
Adam Danz el 14 de Abr. de 2023
I wrote that solution prior to working at MathWorks. It uses undocumented features that aren't intended to be use-facing. The problem with using undocumented features is that they may not behave as one may expect and there is no guarantee that they will be supported in the future. We will consider adding an intepreter property that can be used with parallelplot.

Iniciar sesión para comentar.

Respuesta aceptada

LR_eng
LR_eng el 13 de Mzo. de 2023
Editada: LR_eng el 13 de Mzo. de 2023
I just had the same problem. Just changing the font did not help me. Apparently, one workaround is to convert the parallelplot object to a struct like it was done here. This worked for me and that way you can also nicely access all the other useful properties. However, it produces a warning that it is not recommended to do it like that.
data = randi(1,10,3);
p = parallelplot(data);
S=struct(p);
Warning: Calling STRUCT on an object prevents the object from hiding its implementation details and should thus be avoided. Use DISP or DISPLAY to see the visible public details of an object. See 'help struct' for more information.
S.Axes.TickLabelInterpreter='latex';
S.Axes.XTickLabel = {'$1^1$','$2\cdot2$','$\sqrt{3}$'};
  4 comentarios
Rub Ron
Rub Ron el 14 de Mzo. de 2023
Thanks, but still, what about the x and y labels and the legend
Benjamin Kraus
Benjamin Kraus el 13 de Feb. de 2024
If you are using this approach, just be aware that it is undocumented and not all aspects are guaranteed to work. I've added some additional context over on this other question on the topic, but one huge caveat is that any changes you make to the axes directly won't survive save/load and are unlikely to work in the Live Editor.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Specifying Target for Graphics Output en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by