Index: ../trunk-jpl/src/m/plot/plotmodel.py =================================================================== --- ../trunk-jpl/src/m/plot/plotmodel.py (revision 21425) +++ ../trunk-jpl/src/m/plot/plotmodel.py (revision 21426) @@ -5,7 +5,7 @@ try: import pylab as p import matplotlib.pyplot as plt - from mpl_toolkits.axes_grid1 import ImageGrid, AxesGrid + from mpl_toolkits.axes_grid1 import ImageGrid, AxesGrid except ImportError: print "could not import pylab, matplotlib has not been installed, no plotting capabilities enabled" @@ -16,7 +16,7 @@ ''' at command prompt, type 'plotdoc()' for additional documentation ''' - #First process options + #First process options options=plotoptions(*args) #get number of subplots @@ -35,7 +35,7 @@ else: nrows=np.ceil(numberofplots/subplotwidth) nr=False - + if options.list[0].exist('ncols'): ncols=options.list[0].getfieldvalue('ncols') nc=True @@ -44,11 +44,11 @@ nc=False ncols=int(ncols) nrows=int(nrows) - + #check that nrows and ncols were given at the same time! if not nr==nc: raise StandardError('error: nrows and ncols need to be specified together, or not at all') - + #Go through plots if numberofplots: #if plt.fignum_exists(figurenumber): @@ -81,7 +81,7 @@ cbar_location=options.list[0].getfieldvalue('colorbarpos','right') # right,top cbar_size=options.list[0].getfieldvalue('colorbarsize','5%') cbar_pad=options.list[0].getfieldvalue('colorbarpad','2.5%') # None or % - + axgrid=ImageGrid(fig, 111, nrows_ncols=(nrows,ncols), ngrids=plotnum, Index: ../trunk-jpl/src/m/plot/plot_unit.py =================================================================== --- ../trunk-jpl/src/m/plot/plot_unit.py (revision 21425) +++ ../trunk-jpl/src/m/plot/plot_unit.py (revision 21426) @@ -28,7 +28,7 @@ # }}} # {{{ define wich colormap to use try: - defaultmap=plt.cm.get_cmap('viridis') + defaultmap=plt.cm.get_cmap('viridis',colorlevels) except AttributeError: print("Viridis can't be found (probably too old Matplotlib) reverting to gnuplot colormap") defaultmap=truncate_colormap('gnuplot2',0.1,0.9,colorlevels)