def test__plot_grid__works_with_all_extras_included( self, plot_path, plot_patch): grid = aa.grid.uniform(shape_2d=(11, 11), pixel_scales=1.0) color_array = np.linspace(start=0.0, stop=1.0, num=grid.shape_1d) plotter = aplt.Plotter( output=aplt.Output(path=plot_path, filename="grid1", format="png")) plotter.plot_grid( grid=grid, color_array=color_array, axis_limits=[-1.5, 1.5, -2.5, 2.5], lines=[[(1.0, 1.0), (2.0, 2.0)], [(2.0, 4.0), (5.0, 6.0)]], indexes=[0, 1, 2, 14], symmetric_around_centre=False, ) assert plot_path + "grid1.png" in plot_patch.paths plotter = aplt.Plotter( output=aplt.Output(path=plot_path, filename="grid2", format="png")) plotter.plot_grid( grid=grid, color_array=color_array, axis_limits=[-1.5, 1.5, -2.5, 2.5], lines=[[(1.0, 1.0), (2.0, 2.0)], [(2.0, 4.0), (5.0, 6.0)]], indexes=[0, 1, 2, 14], symmetric_around_centre=True, ) assert plot_path + "grid2.png" in plot_patch.paths aplt.grid( grid=grid, color_array=color_array, axis_limits=[-1.5, 1.5, -2.5, 2.5], lines=[[(1.0, 1.0), (2.0, 2.0)], [(2.0, 4.0), (5.0, 6.0)]], indexes=[0, 1, 2, 14], symmetric_around_centre=True, plotter=aplt.Plotter(output=aplt.Output( path=plot_path, filename="grid3", format="png")), ) assert plot_path + "grid3.png" in plot_patch.paths
import autoarray as aa import autoarray.plot as aplt import numpy as np grid = aa.grid.uniform(shape_2d=(11, 11), pixel_scales=1.0) aplt.grid(grid=grid, axis_limits=[-1.5, 1.5, -2.5, 2.5])
import autoarray as aa import autoarray.plot as aplt import numpy as np grid = aa.grid.uniform(shape_2d=(11, 11), pixel_scales=1.0) aplt.grid(grid=grid, include_origin=True)
import autoarray as aa import autoarray.plot as aplt import numpy as np grid = aa.grid.uniform(shape_2d=(11, 11), pixel_scales=1.0) aplt.grid(grid=grid, include_border=True)
import autoarray as aa import autoarray.plot as aplt import numpy as np grid = aa.grid.uniform(shape_2d=(11, 11), pixel_scales=1.0) aplt.grid(grid=grid, indexes=[0, 1, 2, 14]) aplt.grid(grid=grid, indexes=[(0, 0), (2, 3), (4, 1), (8, 5)]) aplt.grid(grid=grid, indexes=[[(0, 0), (2, 3)], [(4, 1), (8, 5)]]) aplt.grid(grid=grid, indexes=[[[0, 0], [2, 3]], [[4, 1], [8, 5]]])
import autoarray as aa import autoarray.plot as aplt import numpy as np grid = aa.grid.uniform(shape_2d=(11, 11), pixel_scales=1.0) aplt.grid(grid=grid, lines=[(1.0, 1.0), (2.0, 2.0)]) aplt.grid(grid=grid, 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 import numpy as np grid = aa.grid.uniform(shape_2d=(11, 11), pixel_scales=1.0) color_array = np.linspace(start=0.0, stop=1.0, num=grid.shape_1d) aplt.grid(grid=grid, color_array=color_array)
import autoarray as aa import autoarray.plot as aplt import numpy as np grid = aa.grid.uniform(shape_2d=(11, 11), pixel_scales=1.0) aplt.grid(grid=grid, symmetric_around_centre=True) grid = aa.grid.uniform(shape_2d=(11, 11), pixel_scales=1.0, origin=(10.0, 10.0)) aplt.grid(grid=grid, symmetric_around_centre=False) aplt.grid(grid=grid, symmetric_around_centre=True)
import autoarray as aa import autoarray.plot as aplt import numpy as np grid = aa.grid.uniform(shape_2d=(11, 11), pixel_scales=1.0) color_array = np.linspace(start=0.0, stop=1.0, num=grid.shape_1d) aplt.grid( grid=grid, color_array=color_array, axis_limits=[-1.5, 1.5, -2.5, 2.5], lines=[[(1.0, 1.0), (2.0, 2.0)], [(2.0, 4.0), (5.0, 6.0)]], indexes=[0, 1, 2, 14], symmetric_around_centre=False, ) aplt.grid( grid=grid, color_array=color_array, axis_limits=[-1.5, 1.5, -2.5, 2.5], lines=[[(1.0, 1.0), (2.0, 2.0)], [(2.0, 4.0), (5.0, 6.0)]], indexes=[0, 1, 2, 14], symmetric_around_centre=True, )