Semilog in 3d scatter graph
Show older comments
Hi everyone, to plot some results I have written these:
load('file.mat');
for i=1:100
k(i)=s(i).k;
epsilon_s(i)=s(i).epsilon_s;
lambda(i)=s(i).lambda_noisy;
end
figure (1)
scatter3(k,lambda,epsilon_s, 'MarkerEdgeColor', 'k','MarkerFaceColor', [0 0.447 0.7]);
xlabel k , ylabel lambda , zlabel epsilon
How can I set the x-axis to logarithmic scale?
Thanks
Accepted Answer
More Answers (1)
You can do set(gca(),'XScale','log') after you create your scatter plot:
% Using random data
figure (1)
scatter3(rand(1,100),rand(1,100),rand(1,100), 'MarkerEdgeColor', 'k','MarkerFaceColor', [0 0.447 0.7]);
set(gca(),'XScale','log')
xlabel k , ylabel lambda , zlabel epsilon
Categories
Find more on Scatter Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!