Ignore:
Timestamp:
Dec 1, 2011, 3:58:28 PM (13 years ago)
Author:
acolaitis
Message:

PYTHON. Improved quality of movies for really small weight. Also added an option to force even better quality (option is --quality, weight is also reasonnable but rendering is slower).

File:
1 edited

Legend:

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

    r441 r444  
    376376
    377377## Author: AS + AC
    378 def dumpbdy (field,n,stag=None):
    379     nx = len(field[0,:])-1
    380     ny = len(field[:,0])-1
    381     if stag == 'U': nx = nx-1
    382     if stag == 'V': ny = ny-1
    383     if stag == 'W': nx = nx+1 #special les case when we dump stag on W
     378def dumpbdy (field,n,stag=None,condition=False):
     379    if condition:
     380      nx = len(field[0,:])-1
     381      ny = len(field[:,0])-1
     382      if stag == 'U': nx = nx-1
     383      if stag == 'V': ny = ny-1
     384      if stag == 'W': nx = nx+1 #special les case when we dump stag on W
    384385    return field[n:ny-n,n:nx-n]
    385386
    386 ## Author: AS
     387## Author: AS + AC
    387388def getcoorddef ( nc ):   
    388389    import numpy as np
     
    10401041
    10411042def 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):
    1042       from matplotlib.pyplot import contour, plot
     1043      from matplotlib.pyplot import contour, plot, clabel
    10431044      import numpy as np
    10441045      #what_I_plot = what_I_plot*mult
     
    10571058         ### If we plot a 2-D field
    10581059         if len(what_I_plot.shape) is 2:
    1059              #zelevels=[0.2,0.4,0.6,0.8,1.]
     1060             #zelevels=[1.]
    10601061             if mapmode == 0:cs = contour(x,y,what_I_plot, zelevels, colors='k', linewidths = 1 ) #0.33 colors='w' )# , alpha=0.5)
    10611062             elif mapmode == 1:cs = m.contour(x,y,what_I_plot, zelevels, colors='k', linewidths = 1 ) #0.33 colors='w' )# , alpha=0.5)
Note: See TracChangeset for help on using the changeset viewer.