Reputation: 43
I want the scale to be x10^10 not 10^9. How can I change this.
Upvotes: 2
Views: 1128
Reputation: 424
Consider this example:
x = linspace(0,5,1000);
y = 10^10*(exp(x).*sin(20*x));
plot(x,y)
grid on
grid minor
which produces the following plot with automatic limits:
by modifying the axes properties, you can define your own exponent:
ax = gca;
ax.YAxis.Exponent = 10;
obtaining this:
Please read the Matlab documentation for further explanation
Upvotes: 1
Reputation: 60695
There might be an axes property for this, I don’t know. But the simple solution is to plot y * 1e-10
, and then add the “10^10” in the axis label, next to the units (“H2 Volume in Reservoir (10^10 m^3)”). I have always preferred it that way, and it is the more common way to present data.
Note that you can use LaTeX formatting in axis labels to properly show powers and so on.
Upvotes: 0