Caption/Label 用于 Matlab 直方图中的垂直线
Caption/Label for vertical line in Matlab histogram
我使用 Matlab 在直方图中绘制一些 returns。我想通过垂直线在图中看到 0.005 分位数这适用于以下代码
q = 0.995;
MSCIq = quantile(MSCIan, 1-q)
nbins = 50;
histMSCI = histogram(MSCIan, nbins)
xlabel('MSCI')
ylabel('count')
title('test')
line([MSCIq MSCIq], ylim, 'Color', 'r')
我想用文本和 MSCIq 的值标记垂直线。 (说 MSCIq= -0.44 那么我想要 "Value-at-Risk = -0.44" 之类的东西)。直接在线或以图例的形式。
有人知道怎么做吗??
hold on;
text(100, 300, 'MSCIq= -0.44');
hold off;
我使用 Matlab 在直方图中绘制一些 returns。我想通过垂直线在图中看到 0.005 分位数这适用于以下代码
q = 0.995;
MSCIq = quantile(MSCIan, 1-q)
nbins = 50;
histMSCI = histogram(MSCIan, nbins)
xlabel('MSCI')
ylabel('count')
title('test')
line([MSCIq MSCIq], ylim, 'Color', 'r')
我想用文本和 MSCIq 的值标记垂直线。 (说 MSCIq= -0.44 那么我想要 "Value-at-Risk = -0.44" 之类的东西)。直接在线或以图例的形式。 有人知道怎么做吗??
hold on;
text(100, 300, 'MSCIq= -0.44');
hold off;