def test_scalebar_showhide(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_scalebar(0.1) f.scalebar.hide() f.scalebar.show(0.1) f.close()
def test_beam_pad(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_beam(major=0.1, minor=0.04, angle=10.) f.beam.set_pad(0.1) f.beam.set_pad(0.3) f.close()
def test_scalebar_length(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_scalebar(0.1) f.scalebar.set_length(0.01) f.scalebar.set_length(0.1) f.close()
def test_frame_linewidth(): data = np.zeros((16, 16)) f = FITSFigure(data) f.frame.set_linewidth(0) f.frame.set_linewidth(1) f.frame.set_linewidth(10) f.close()
def test_beam_hatch(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_beam(major=0.1, minor=0.04, angle=10.) for hatch in ['/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*']: f.beam.set_hatch(hatch) f.close()
def test_grid_showhide(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_grid() f.grid.hide() f.grid.show() f.close()
def test_scalebar_addremove(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_scalebar(0.1) f.remove_scalebar() f.add_scalebar(0.1) f.close()
def test_grid_addremove(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_grid() f.remove_grid() f.add_grid() f.close()
def test_ticks_minor_frequency(): data = np.zeros((16, 16)) f = FITSFigure(data) f.ticks.set_minor_frequency(1) f.ticks.set_minor_frequency(5) f.ticks.set_minor_frequency(10) f.close()
def test_scalebar_frame(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_scalebar(0.1) f.scalebar.set_frame(True) f.scalebar.set_frame(False) f.close()
def test_ticks_color(): data = np.zeros((16, 16)) f = FITSFigure(data) f.ticks.set_color('black') f.ticks.set_color('#003344') f.ticks.set_color((1.0, 0.4, 0.3)) f.close()
def test_beam_frame(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_beam(major=0.1, minor=0.04, angle=10.) f.beam.set_frame(True) f.beam.set_frame(False) f.close()
def test_scalebar_font(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_scalebar(0.1) f.scalebar.set_font(size='small', weight='bold', stretch='normal', family='serif', style='normal', variant='normal') f.close()
def test_ticks_linewidth(): data = np.zeros((16, 16)) f = FITSFigure(data) f.ticks.set_linewidth(1) f.ticks.set_linewidth(3) f.ticks.set_linewidth(10) f.close()
def test_grid_linewidth(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_grid() f.grid.set_linewidth(0) f.grid.set_linewidth(2) f.grid.set_linewidth(5) f.close()
def test_ticks_spacing(): data = np.zeros((16, 16)) f = FITSFigure(data) f.ticks.set_xspacing(0.5) f.ticks.set_xspacing(1.) f.ticks.set_yspacing(0.5) f.ticks.set_yspacing(1.) f.close()
def test_colorbar_showhide(): data = np.zeros((16, 16)) f = FITSFigure(data) f.show_grayscale() f.add_colorbar() f.colorbar.hide() f.colorbar.show() f.close()
def test_colorbar_addremove(): data = np.zeros((16, 16)) f = FITSFigure(data) f.show_grayscale() f.add_colorbar() f.remove_colorbar() f.add_colorbar() f.close()
def test_scalebar_alpha(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_scalebar(0.1) f.scalebar.set_alpha(0.1) f.scalebar.set_alpha(0.2) f.scalebar.set_alpha(0.5) f.close()
def test_scalebar_color(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_scalebar(0.1) f.scalebar.set_color('black') f.scalebar.set_color('#003344') f.scalebar.set_color((1.0, 0.4, 0.3)) f.close()
def test_scalebar_corner(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_scalebar(0.1) for corner in ['top', 'bottom', 'left', 'right', 'top left', 'top right', 'bottom left', 'bottom right']: f.scalebar.set_corner(corner) f.close()
def test_beam_linewidth(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_beam(major=0.1, minor=0.04, angle=10.) f.beam.set_linewidth(0) f.beam.set_linewidth(1) f.beam.set_linewidth(5) f.close()
def test_beam_edgecolor(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_beam(major=0.1, minor=0.04, angle=10.) f.beam.set_edgecolor('black') f.beam.set_edgecolor('#003344') f.beam.set_edgecolor((1.0, 0.4, 0.3)) f.close()
def test_axis_labels_position(): data = np.zeros((16, 16)) f = FITSFigure(data) f.axis_labels.set_xposition('top') f.axis_labels.set_xposition('bottom') f.axis_labels.set_yposition('right') f.axis_labels.set_yposition('left') f.close()
def test_grid_alpha(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_grid() f.grid.set_alpha(0.0) f.grid.set_alpha(0.3) f.grid.set_alpha(1.0) f.close()
def test_scalebar_label(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_scalebar(0.1) f.scalebar.set_label('1 pc') f.scalebar.set_label('5 AU') f.scalebar.set_label('2"') f.close()
def test_beam_linestyle(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_beam(major=0.1, minor=0.04, angle=10.) f.beam.set_linestyle('solid') f.beam.set_linestyle('dotted') f.beam.set_linestyle('dashed') f.close()
def test_beam_angle(): data = np.zeros((16, 16)) f = FITSFigure(data) f.show_grayscale() f.add_beam(major=0.1, minor=0.04, angle=10.) f.beam.set_angle(0.) f.beam.set_angle(55.) f.close()
def test_grid_linestyle(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_grid() f.grid.set_linestyle('solid') f.grid.set_linestyle('dashed') f.grid.set_linestyle('dotted') f.close()
def test_beam_corner(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_beam(major=0.1, minor=0.04, angle=10.) for corner in ['top', 'bottom', 'left', 'right', 'top left', 'top right', 'bottom left', 'bottom right']: f.beam.set_corner(corner) f.close()
def test_tick_labels_position(): data = np.zeros((16, 16)) f = FITSFigure(data) f.tick_labels.set_xposition('top') f.tick_labels.set_xposition('bottom') f.tick_labels.set_yposition('right') f.tick_labels.set_yposition('left') f.close()
def test_grid_color(): data = np.zeros((16, 16)) f = FITSFigure(data) f.add_grid() f.grid.set_color('black') f.grid.set_color('#003344') f.grid.set_color((1.0, 0.4, 0.3)) f.close()
def test_beam_addremove(): data = np.zeros((16, 16)) f = FITSFigure(data) f.show_grayscale() f.add_beam(major=0.1, minor=0.04, angle=10.) f.remove_beam() f.add_beam(major=0.1, minor=0.04, angle=10.) f.remove_beam() f.close()