def test_figure_size(self): self.assertArrayEqual(self.g.fig.get_size_inches(), (10, 3)) g = xplt.FacetGrid(self.darray, col='z', size=6) self.assertArrayEqual(g.fig.get_size_inches(), (19, 6)) g = self.darray.plot.imshow(col='z', size=6) self.assertArrayEqual(g.fig.get_size_inches(), (19, 6)) g = xplt.FacetGrid(self.darray, col='z', size=4, aspect=0.5) self.assertArrayEqual(g.fig.get_size_inches(), (7, 4)) g = xplt.FacetGrid(self.darray, col='z', figsize=(9, 4)) self.assertArrayEqual(g.fig.get_size_inches(), (9, 4)) with self.assertRaisesRegexp(ValueError, "cannot provide both"): g = xplt.plot(self.darray, row=2, col='z', figsize=(6, 4), size=6) with self.assertRaisesRegexp(ValueError, "Can't use"): g = xplt.plot(self.darray, row=2, col='z', ax=plt.gca(), size=6)
def mplot(self, facet_axis: str = "time" ): for array in self.inputs: xrplot.plot( array.xr, col = facet_axis )
def dplot(self, domain: Domain ): for array in self.inputs: xrplot.plot( array.subset( domain, { domain.name } ).xr )