I want to plot a graph in MATLAB with $x$- axis data varies from $1$ to $15$, where as $y$-axis data varies over order from $10^0$ to $10^{-1009}$. Using 'semilog' or 'set axis I am not able to plot graph for $y$-axis data having order lower that $10^{-150}$. I am getting following error
Error using set
Bad property value found.
Object Name : axes
Property Name : 'YLim'
Values must be increasing and non-NaN.
Here is my MATLAB code
count = 1:15;
subplot(2, 2, 1)
SAcE = [0.2548 0.18759 0.075788 0.0050042 1.4406e-6 3.437e-17 4.6674e-49 1.1689e-144 7.4999e-358 1.5437e-784 3.9277e-1009 5.0621e-1009 3.6067e-1009 5.0621e-1009 3.6067e-1009];
semilogy(count,SAcE, '-b*','LineWidth',1.0, 'MarkerSize',5, 'MarkerEdgeColor','b')
axis([1 15 1 10^(-1009) ])
Thank you for the help.
If you take a look at the array you are plotting, you will likely see something like this:
This indicates that MATLAB is not able to represent values as small as you require, see for example this question and answers for more information. Instead the very small values are rounded to zero.
I suggest that you do a workaround where you 1) represent your values in MATLAB with larger values (possibly scaled versions of your current ones) that are distinguishable from zero and 2) in your plot, write a custom y-label that shows the correct values of the data. Below is an example for synthetic data: