Changes in trunk/python/asaplotbase.py [2715:2700]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asaplotbase.py
r2715 r2700 9 9 from matplotlib.figure import Figure, Text 10 10 from matplotlib.font_manager import FontProperties as FP 11 from numpy import sqrt , ceil11 from numpy import sqrt 12 12 from matplotlib import rc, rcParams 13 13 from matplotlib.ticker import OldScalarFormatter … … 100 100 return False 101 101 102 def _subplotsOk(self, rows, cols, npanel=0):103 """104 Check if the axes in subplots are actually the ones plotted on105 the figure. Returns a bool.106 This method is to detect manual layout changes using mpl methods.107 """108 # compare with user defined layout109 if (rows is not None) and (rows != self.rows):110 return False111 if (cols is not None) and (cols != self.cols):112 return False113 # check number of subplots114 figaxes = self.figure.get_axes()115 np = self.rows*self.cols116 if npanel > np:117 return False118 if len(figaxes) != np:119 return False120 if len(self.subplots) != len(figaxes):121 return False122 # compare axes instance in this class and on the plotter123 ok = True124 for ip in range(np):125 if self.subplots[ip]['axes'] != figaxes[ip]:126 ok = False127 break128 return ok129 102 130 103 ### Delete artists ###
Note:
See TracChangeset
for help on using the changeset viewer.