Amateur
Amateur

Reputation: 1277

make log probability plot with desired x-tickmark label and with gridlines in Matlab

I would like to make a log-probability plot for my data. I looked up the probplot function and wrote this code

x = [0.3,1, 2,5, 2];
probplot('lognormal',x)

I would like it to show the grid lines like this plot http://www.mathworks.com/help/toolbox/stats/wblplot.html

and also relabel x-tickmark at 0, 1 (instead of 10^0), and 100

Thank you for your help!

Upvotes: 0

Views: 419

Answers (1)

tim
tim

Reputation: 10176

There you go:

x = [0.3, 1, 2,5, 2, 12 25];
probplot('lognormal', x)
grid on
ticks = arrayfun(@num2str, get(gca, 'XTick'), 'UniformOutput', false);
set(gca,'XTickLabel', ticks)

Hope that helps :)

Upvotes: 1

Related Questions