Changeset 441


Ignore:
Timestamp:
Dec 1, 2011, 2:31:04 PM (13 years ago)
Author:
acolaitis
Message:

PYTHON. Bug fix for contours and mapmode 1

Location:
trunk/UTIL/PYTHON
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/myplot.py

    r440 r441  
    10391039# which can be usefull
    10401040
    1041 def call_contour(what_I_plot,error,lon,lat,vert,time,vertmode,ze_var2,indextime,indexlon,indexlat,indexvert,yintegral,mapmode,typefile,var2,ticks):
     1041def call_contour(what_I_plot,error,x,y,m,lon,lat,vert,time,vertmode,ze_var2,indextime,indexlon,indexlat,indexvert,yintegral,mapmode,typefile,var2,ticks):
    10421042      from matplotlib.pyplot import contour, plot
    10431043      import numpy as np
     
    10581058         if len(what_I_plot.shape) is 2:
    10591059             #zelevels=[0.2,0.4,0.6,0.8,1.]
    1060              cs = contour(x,y,what_I_plot, zelevels, colors='k', linewidths = 1 ) #0.33 colors='w' )# , alpha=0.5)
     1060             if mapmode == 0:cs = contour(x,y,what_I_plot, zelevels, colors='k', linewidths = 1 ) #0.33 colors='w' )# , alpha=0.5)
     1061             elif mapmode == 1:cs = m.contour(x,y,what_I_plot, zelevels, colors='k', linewidths = 1 ) #0.33 colors='w' )# , alpha=0.5)
    10611062             #clabel(cs,zelevels,inline=3,fmt='%1.1f',fontsize=7)
    10621063         ### If we plot a 1-D field
  • trunk/UTIL/PYTHON/planetoplot.py

    r440 r441  
    281281       if var2:
    282282           what_I_plot_contour, error = reducefield(all_var2[index_f], d4=indextime, d1=indexlon, d2=indexlat , d3=indexvert, yint=yintegral, alt=vert)
    283            call_contour(what_I_plot_contour,error,lon,lat,vert,time,vertmode,all_var2[index_f],indextime,indexlon,indexlat,indexvert,yintegral,mapmode,typefile, var2, ticks)
     283           call_contour(what_I_plot_contour,error,x,y,m,lon,lat,vert,time,vertmode,all_var2[index_f],indextime,indexlon,indexlat,indexvert,yintegral,mapmode,typefile, var2, ticks)
    284284
    285285       #### Shaded plot
     
    341341                       # Renew contours for movie frames which are not the first one
    342342                       if var2:
    343                          call_contour(what_I_plot_contour[imov,:,:],error,lon,lat,vert,time,vertmode,all_var2[index_f],imov,indexlon,indexlat,indexvert,yintegral,mapmode,typefile, var2, ticks)
     343                         call_contour(what_I_plot_contour[imov,:,:],error,x,y,m,lon,lat,vert,time,vertmode,all_var2[index_f],imov,indexlon,indexlat,indexvert,yintegral,mapmode,typefile, var2, ticks)
    344344                    if not tile:
    345345                        #zelevels = np.linspace(zevmin*(1. + 1.e-7),zevmax*(1. - 1.e-7)) #,num=20)
Note: See TracChangeset for help on using the changeset viewer.