When I run the script below, the range tuple is
[0.0, 1.0, 0.0, 1.0]
but the data has an actual range more like [ 0, 6.8, 0, 1], the plot
looks correct, which is good, but the range tuple is wrong. It seems
to work fine with simple data examples but breaks with this data..
This is with Matplotlib v0.54.2
thanks,
S
#!/usr/bin/env python
import matplotlib
matplotlib.use( 'Agg' )
from matplotlib.matlab import *
x = [0.010331810701842871, 0.021066657441595242, 0.030855574358625324,
0.040250726568746162, 0.050644838316290561, 0.06189415611955508,
0.07125403603817515, 0.081941196069626396, 0.090571411794129267,
0.10290686247291918, 0.11444331944589031, 0.1236257225395061,
0.13473835780826723, 0.14381271569968049, 0.15290481341399415,
0.16191929992110601, 0.17121682383712447, 0.18154558306766691,
0.19166699839060464, 0.20041014147521002, 0.21840114667773247,
0.22475368329468168, 0.23712042657177207, 0.24150561679187502,
0.25777416395085717, 0.26370159485599637, 0.27115042730497135,
0.28646842404763118, 0.2945605476107212, 0.3014844847904839,
0.32090649437954005, 0.33474756188146532, 0.3463087158021369,
0.35384920060301411, 0.36174596447259966, 0.37111350597671988,
0.38500936142234621, 0.39310145975693639, 0.40090051408431981,
0.41178548112097552, 0.42521787270909123, 0.43091391530572509,
0.44614791389868291, 0.45494374609978966, 0.46186821556645236,
0.47731590557971521, 0.48107399513220339, 0.4960609645338554,
0.50293271758231672, 0.51908955994969641, 0.52754726056509504,
0.538105663764743, 0.54695915774055104, 0.55445022367222696,
0.56141617038929059, 0.57715732876336034, 0.58331953613820509,
0.59203627993390995, 0.61018141394423642, 0.62628626881841487,
0.63192539107874746, 0.6458016862544731, 0.65418149983636986,
0.66065035611712197, 0.67079601269616063, 0.69003927324831349,
0.70370643441733494, 0.71145337333441738, 0.72891863943192814,
0.73620657868200012, 0.7416812708183288, 0.7543094129509258,
0.76333622772703824, 0.77279502708216075, 0.78113840195825734,
0.79518542174128759, 0.80283072754516693, 0.81348359069451792,
0.82483196143668502, 0.83317823230638111, 0.84262635287300347,
0.85060271704979107, 0.86622649392165829, 0.87378445858363607,
0.88564073099481444, 0.89462710396172573, 0.90198905417679853,
0.91225691885603977, 0.92314275233649545, 0.93022796091666171,
0.94117604421861889, 0.95082199713874538, 0.96289363701352881,
0.97353750955077867, 0.98050771299924244, 0.99071041335468191,
1.0]
y = [
6.8988430562808141, 6.0199122670123426, 5.4877276439939475,
5.1709425981970805, 4.987254825650786, 4.7417327487085501,
4.4978934463413314, 4.3250286563667935, 4.2007265350751535,
4.0541464163597736, 3.9189273603700538, 3.8235472853454988,
3.7164102779555512, 3.6445717916889664, 3.5480676732338021,
3.4444786019802529, 3.3625904441222376, 3.2806471950213569,
3.2011340640076367, 3.1510030907701263, 3.019839474428009,
2.9822021628354816, 2.9059803156387574, 2.8856395987093051,
2.7921865811397399, 2.7589612680359936, 2.7174335309498603,
2.6324831804685527, 2.5900376295500123, 2.5597848772179619,
2.4655519919224202, 2.4080342023330061, 2.357560958250656,
2.3276036195316627, 2.2941290050680068, 2.2529601292610253,
2.2040744982244793, 2.1752627057435507, 2.1490323132220679,
2.1143606533996637, 2.0692410113398481, 2.0505144863177676,
2.0051930431043892, 1.9783735967494613, 1.9567455423743982,
1.9117142836414112, 1.9015246184270749, 1.8570312324545144,
1.8373286819197756, 1.7930616898324281, 1.7698772818526114,
1.7416837457846306, 1.7191776401533563, 1.6985358308203811,
1.6826034910369574, 1.6460157936833077, 1.6312087148596748,
1.6120311128551963, 1.5717381767713174, 1.5393408540494826,
1.5277823839983642, 1.4990255085133, 1.482078897585539,
1.4703127379153567, 1.4503193917059973, 1.414718900022627,
1.3902791696828953, 1.3773840753041227, 1.3485627887870608,
1.3368879344126419, 1.3280498048998697, 1.3087099772217325,
1.2943614279230125, 1.2807173903668139, 1.2682285769430715,
1.2471152061484074, 1.2357065246849019, 1.2212562025804223,
1.2059396101922433, 1.19434578885053, 1.1818376806548032,
1.1710070331197149, 1.150850866654737, 1.141314474700714,
1.1268033459945574, 1.1160062947810399, 1.1072603628571882,
1.0952161339218929, 1.082587112669787, 1.0743414397576259,
1.0620959689501084, 1.0514270580154892, 1.0383865727621933,
1.0270434782193152, 1.0198775771453545, 1.009374502605529,
1.0]
plot(x, y )
print axis() # why does this print [0.0, 1.0, 0.0, 1.0]?
savefig('simple_plot')
···
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com