在 x 和 y 轴上绘制符号
plotting with symbols on x and y axis
嗨,我想要上图,它可以在 matlab 或 python 上编码(不过学习两种语言的方法可能会很好)。你们以前有过类似的经历吗?
from matplotlib import pyplot as plt
nums = [0,1,2,3]
chars = ["$δ^0$","$δ^1$","$δ^2$","$δ^3$"]
plt.xticks(nums,chars)
plt.show()
这个情节看起来像:
在 Matlab 中相当简单:
% with tex interpreter
figure;
subplot(1,2,1)
xticks([0:.2:1])
name_of_ticks=({'\alpha','\beta','c^3','\delta^5','\delta^{\kappa}'});
xticklabels(name_of_ticks)
set(gca,'TickLabelInterpreter', 'tex');
% with more complex latex interpreter
subplot(1,2,2)
xticks([0:.2:1])
name_of_ticks=({'$\alpha$','$\beta$','$c^3$','$\delta^5$','$\delta^{\kappa}$'});
xticklabels(name_of_ticks)
set(gca,'TickLabelInterpreter', 'latex');
嗨,我想要上图,它可以在 matlab 或 python 上编码(不过学习两种语言的方法可能会很好)。你们以前有过类似的经历吗?
from matplotlib import pyplot as plt
nums = [0,1,2,3]
chars = ["$δ^0$","$δ^1$","$δ^2$","$δ^3$"]
plt.xticks(nums,chars)
plt.show()
这个情节看起来像:
在 Matlab 中相当简单:
% with tex interpreter
figure;
subplot(1,2,1)
xticks([0:.2:1])
name_of_ticks=({'\alpha','\beta','c^3','\delta^5','\delta^{\kappa}'});
xticklabels(name_of_ticks)
set(gca,'TickLabelInterpreter', 'tex');
% with more complex latex interpreter
subplot(1,2,2)
xticks([0:.2:1])
name_of_ticks=({'$\alpha$','$\beta$','$c^3$','$\delta^5$','$\delta^{\kappa}$'});
xticklabels(name_of_ticks)
set(gca,'TickLabelInterpreter', 'latex');