def test__plot_array__works_with_all_extras_included( self, plot_path, plot_patch): array = aa.array.ones(shape_2d=(31, 31), pixel_scales=(1.0, 1.0), sub_size=2) mask = aa.mask.circular( shape_2d=array.shape_2d, pixel_scales=array.pixel_scales, radius=5.0, centre=(2.0, 2.0), ) grid = aa.grid.uniform(shape_2d=(11, 11), pixel_scales=0.5) plotter = aplt.Plotter(output=aplt.Output( path=plot_path, filename="array1", format="png")) plotter.plot_array( array=array, mask=mask, grid=grid, positions=[(-1.0, -1.0)], lines=[(1.0, 1.0), (2.0, 2.0)], include_origin=True, include_border=True, ) assert plot_path + "array1.png" in plot_patch.paths plotter = aplt.Plotter(output=aplt.Output( path=plot_path, filename="array2", format="png")) plotter.plot_array( array=array, mask=mask, grid=grid, positions=[[(1.0, 1.0), (2.0, 2.0)], [(-1.0, -1.0)]], lines=[[(1.0, 1.0), (2.0, 2.0)], [(2.0, 4.0), (5.0, 6.0)]], include_origin=True, include_border=True, ) assert plot_path + "array2.png" in plot_patch.paths aplt.array( array=array, mask=mask, grid=grid, positions=[(-1.0, -1.0)], lines=[(1.0, 1.0), (2.0, 2.0)], include=aplt.Include(origin=True, border=True), plotter=aplt.Plotter(output=aplt.Output( path=plot_path, filename="array3", format="png")), ) assert plot_path + "array3.png" in plot_patch.paths
import autoarray as aa import autoarray.plot as aplt array = aa.array.ones(shape_2d=(31, 31), pixel_scales=(1.0, 1.0), sub_size=2) aplt.array(array=array, lines=[(1.0, 1.0), (2.0, 2.0)]) aplt.array(array=array, lines=[[(1.0, 1.0), (2.0, 2.0)], [(2.0, 4.0), (5.0, 6.0)]])
import autoarray as aa import autoarray.plot as aplt array = aa.array.ones(shape_2d=(31, 31), pixel_scales=(1.0, 1.0), sub_size=2) array[0] = 3.0 mask = aa.mask.circular( shape_2d=array.shape_2d, pixel_scales=array.pixel_scales, radius=5.0, centre=(2.0, 2.0), ) aplt.array(array=array, mask=mask, include_border=True)
import autoarray as aa import autoarray.plot as aplt array = aa.array.ones(shape_2d=(31, 31), pixel_scales=(1.0, 1.0), sub_size=2) array[0] = 3.0 grid = aa.grid.uniform(shape_2d=(11, 11), pixel_scales=0.5) aplt.array(array=array, grid=grid)
import autoarray as aa import autoarray.plot as aplt array = aa.array.ones(shape_2d=(31, 31), pixel_scales=(1.0, 1.0), sub_size=2) array[0] = 3.0 aplt.array(array=array, include_origin=True)
array[0] = 3.0 mask = aa.mask.circular( shape_2d=array.shape_2d, pixel_scales=array.pixel_scales, radius=5.0, centre=(2.0, 2.0), ) grid = aa.grid.uniform(shape_2d=(11, 11), pixel_scales=0.5) aplt.array( array=array, mask=mask, grid=grid, positions=[(-1.0, -1.0)], lines=[(1.0, 1.0), (2.0, 2.0)], include_origin=True, include_border=True, ) aplt.array( array=array, mask=mask, grid=grid, positions=[[(1.0, 1.0), (2.0, 2.0)], [(-1.0, -1.0)]], lines=[[(1.0, 1.0), (2.0, 2.0)], [(2.0, 4.0), (5.0, 6.0)]], include_origin=True, include_border=True, )
import autoarray as aa import autoarray.plot as aplt array = aa.array.ones(shape_2d=(31, 31), pixel_scales=(1.0, 1.0), sub_size=2) array[0] = 3.0 mask = aa.mask.circular( shape_2d=array.shape_2d, pixel_scales=array.pixel_scales, radius=5.0, centre=(2.0, 2.0), ) aplt.array(array=array, mask=mask)
import autoarray as aa import autoarray.plot as aplt array = aa.array.ones(shape_2d=(31, 31), pixel_scales=(1.0, 1.0), sub_size=2) array[0] = 3.0 aplt.array(array=array, positions=[(1.0, 1.0), (2.0, 2.0)]) aplt.array(array=array, positions=[[(1.0, 1.0), (2.0, 2.0)], [(-1.0, -1.0)]])