def _init_gridlines(self, grid_helper=None): gridlines = GridlinesCollection(None, transform=self.transData, colors=rcParams['grid.color'], linestyles=rcParams['grid.linestyle'], linewidths=rcParams['grid.linewidth']) self._set_artist_props(gridlines) if grid_helper is None: grid_helper = self.get_grid_helper() gridlines.set_grid_helper(grid_helper) self.axes._set_artist_props(gridlines) self.gridlines = gridlines
def _init_gridlines(self, grid_helper=None): gridlines = GridlinesCollection(None, transform=self.transData, colors=rcParams['grid.color'], linestyles=rcParams['grid.linestyle'], linewidths=rcParams['grid.linewidth']) self._set_artist_props(gridlines) if grid_helper is None: grid_helper = self.get_grid_helper() gridlines.set_grid_helper(grid_helper) self.axes._set_artist_props(gridlines) # gridlines.set_clip_path(self.axes.patch) # set_clip_path need to be defered after Axes.cla is completed. # It is done inside the cla. self.gridlines = gridlines
def _init_gridlines(self, grid_helper=None): gridlines = GridlinesCollection(None, transform=self.transData, colors=rcParams['grid.color'], linestyles=rcParams['grid.linestyle'], linewidths=rcParams['grid.linewidth']) self._set_artist_props(gridlines) if grid_helper is None: grid_helper = self.get_grid_helper() gridlines.set_grid_helper(grid_helper) self.axes._set_artist_props(gridlines) # gridlines.set_clip_path(self.axes.patch) # set_clip_path need to be deferred after Axes.cla is completed. # It is done inside the cla. self.gridlines = gridlines
def new_gridlines(self, ax): """ Create and return a new GridlineCollection instance. *which* : "major" or "minor" *axis* : "both", "x" or "y" """ gridlines = GridlinesCollection(None, transform=ax.transData, colors=rcParams['grid.color'], linestyles=rcParams['grid.linestyle'], linewidths=rcParams['grid.linewidth']) ax._set_artist_props(gridlines) gridlines.set_grid_helper(self) ax.axes._set_artist_props(gridlines) # gridlines.set_clip_path(self.axes.patch) # set_clip_path need to be deferred after Axes.cla is completed. # It is done inside the cla. return gridlines