Ignore:
Timestamp:
Dec 1, 2011, 11:10:25 AM (13 years ago)
Author:
acolaitis
Message:

PYTHON. Contour plots now working in movies. I had to modify the call_contour (get out the reducefield part, introduce a new variable what_I_plot_contour dedicated to var2) in order to conserve the speed of movie rendering. (otherwise there were calls to reducefield for each frame in call_contour)

File:
1 edited

Legend:

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

    r439 r440  
    279279
    280280       #### Contour plot -- to be activated with movies
    281        if var2 and mrate is None:
    282            call_contour(lon,lat,vert,time,vertmode,all_var2[index_f],indextime,indexlon,indexlat,indexvert,yintegral,mapmode,typefile, var2, ticks)
     281       if var2:
     282           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)
    283284
    284285       #### Shaded plot
     
    329330                    if flagnolow:    what_I_plot_frame = nolow(what_I_plot_frame)
    330331
    331                     # Renew axis directives for movie frames which are not the first one.
    332332                    if imov > 0:
     333                       # Renew axis directives for movie frames which are not the first one.
    333334                       zxmin, zxmax = xaxis ; zymin, zymax = yaxis
    334335                       if zxmin is not None: mpl.pyplot.xlim(xmin=zxmin)
     
    338339                       if invert_y:     lima,limb = mpl.pyplot.ylim() ; mpl.pyplot.ylim(limb,lima)
    339340                       if ylog:         mpl.pyplot.semilogy()
    340                    
     341                       # Renew contours for movie frames which are not the first one
     342                       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)
    341344                    if not tile:
    342345                        #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.