MATLAB Answers

0

Plotting very small values using bar command

Asked by Ahmad Bilal on 17 Jul 2018
Latest activity Commented on by Ahmad Bilal on 21 Jul 2018
Hi, I have a series of data such as 1.11134,0.01823643,0.08337726 and so on. Can anybody guide how can i plot this series of numbers using bar command. Thank you.

  3 Comments

jonas
on 17 Jul 2018
What is the problem?
i want to plot series of very small numbers using bar command. but when i try to execute the code the figure comes empty.
jonas
on 17 Jul 2018
Can you show us your code so far? If possible, attach the data as well

Sign in to comment.

Tags

1 Answer

Answer by Pawel Jastrzebski on 17 Jul 2018
 Accepted Answer

If you have a mix of relatively high and low values, you might want to consider using the logarithmic scale for the y-axis, i.e.:
y = [1.11134,0.01823643,0.08337726];
figure
ax = gca();
b = bar(y);
set(ax,...
'YScale','log');

  1 Comment

Thanks. It works

Sign in to comment.