Changeset 827 for trunk/UTIL/PYTHON/mcd/mcd.py
- Timestamp:
- Nov 2, 2012, 5:15:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/mcd/mcd.py
r821 r827 80 80 self.fixedlt = False 81 81 self.zonmean = False 82 self.min2d = None 83 self.max2d = None 84 self.dpi = 80. 82 85 83 86 def viking1(self): self.name = "Viking 1 site. MCD v4.3 output" ; self.lat = 22.48 ; self.lon = -49.97 ; self.xdate = 97. … … 101 104 if not oneline: self.title = self.title + "\n" 102 105 if self.lats is None: self.title = self.title + " Latitude " + str(self.lat) + "N" 103 if self.zonmean: self.title = self.title + "Zonal mean over all longitudes." 104 elif self.lons is None: self.title = self.title + " Longitude " + str(self.lon) + "E" 106 if self.zonmean and self.lats is not None and self.xzs is not None: 107 self.title = self.title + "Zonal mean over all longitudes." 108 elif self.lons is None: 109 self.title = self.title + " Longitude " + str(self.lon) + "E" 105 110 if self.xzs is None: 106 111 self.vertunits() … … 513 518 # The size * the dpi gives the final image size 514 519 # a4"x4" image * 80 dpi ==> 320x320 pixel image 515 canvas.print_figure(figname, dpi= 80)520 canvas.print_figure(figname, dpi=self.dpi) 516 521 517 522 ################### … … 704 709 ## define field. bound field. 705 710 what_I_plot = np.transpose(field) 706 zevmin, zevmax = myplot.calculate_bounds(what_I_plot ) ## vmin=min(what_I_plot_frame), vmax=max(what_I_plot_frame))711 zevmin, zevmax = myplot.calculate_bounds(what_I_plot,vmin=self.min2d,vmax=self.max2d) 707 712 what_I_plot = myplot.bounds(what_I_plot,zevmin,zevmax) 708 713 ## define contour field levels. define color palette … … 734 739 # The size * the dpi gives the final image size 735 740 # a4"x4" image * 80 dpi ==> 320x320 pixel image 736 canvas.print_figure(figname, dpi= 80)741 canvas.print_figure(figname, dpi=self.dpi) 737 742 738 743 def htmlplot2d(self,tabtodo,figname="temp.png"): … … 775 780 ## define field. bound field. 776 781 what_I_plot = np.transpose(field) 777 zevmin, zevmax = myplot.calculate_bounds(what_I_plot ) ## vmin=min(what_I_plot_frame), vmax=max(what_I_plot_frame))782 zevmin, zevmax = myplot.calculate_bounds(what_I_plot,vmin=self.min2d,vmax=self.max2d) 778 783 what_I_plot = myplot.bounds(what_I_plot,zevmin,zevmax) 779 784 ## define contour field levels. define color palette … … 806 811 # The size * the dpi gives the final image size 807 812 # a4"x4" image * 80 dpi ==> 320x320 pixel image 808 canvas.print_figure(figname, dpi= 80)813 canvas.print_figure(figname, dpi=self.dpi) 809 814 810 815
Note: See TracChangeset
for help on using the changeset viewer.