Peter
Peter

Reputation: 71

LevelList in contour plots

There is some information I couldn't find neither in the documentation nor in forums:

Code:

[C,h] = contour(beta,alpha,Coupling)

clabel(C,h)

axis([0 3 0 3])

Upvotes: 0

Views: 664

Answers (1)

Wolfie
Wolfie

Reputation: 30044

Let's say you had some random data

%    Data     Order of magnitude base 10
a = [0.0964   % O(1e-1)
     0.0157   % O(1e-2)
     0.0970   % O(1e-1)
     0.9571   % O(1e+0)
     0.4853   % O(1e+0) 
     0.8002   % O(1e+0)
     1.4188   % O(1e+0) 
     4.2176   % O(1e+1)
     9.1573]  % O(1e+1)

Where the orders of magnitude are given by

orders = round(log10(a));

You can replace your z values with this formula z2 = 10.^round(log10(z)) to define them by their magnitude. Then produce a contour plot with the distinct orders of magnitude just as you did before, but using z2 not z.


For your example:

CouplingMagnitudes = 10.^(round(log10(Coupling)));
[C,h] = contour(beta, alpha, CouplingMagnitudes)

Upvotes: 1

Related Questions