Changeset 28044


Ignore:
Timestamp:
01/08/24 07:07:25 (15 months ago)
Author:
Mathieu Morlighem
Message:

CHG: deal with negative log scale

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/manualcb.m

    r24535 r28044  
    7272        %New method
    7373        test=logspace(-10,10,21);
    74         pos=find(test>=zmin & test<=zmax);
    75         ztick= test(pos);
    76         ytick= (log(ztick) - log(zmin))/(log(zmax) - log(zmin));
     74        if zmax<0 %Negative log (RARE!!)
     75                pos=find(test>=-zmax & test<=-zmin);
     76                ztick= -test(pos);
     77                ytick= (log(ztick) - log(zmin))/(log(zmax) - log(zmin));
     78                ztick
     79                ytick
     80        else
     81                pos=find(test>=zmin & test<=zmax);
     82                ztick= test(pos);
     83                ytick= (log(ztick) - log(zmin))/(log(zmax) - log(zmin));
     84        end
    7785end
    7886
Note: See TracChangeset for help on using the changeset viewer.