parallelplot and latex interpreter
6 次查看(过去 30 天)
显示 更早的评论
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 个评论
Adam Danz
2023-4-14
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.
采纳的回答
LR_eng
2023-3-13
编辑:LR_eng
2023-3-13
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);
S.Axes.TickLabelInterpreter='latex';
S.Axes.XTickLabel = {'$1^1$','$2\cdot2$','$\sqrt{3}$'};
4 个评论
Benjamin Kraus
2024-2-13
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specifying Target for Graphics Output 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!