本文整理汇总了Python中aplpy.FITSFigure.add_scalebar方法的典型用法代码示例。如果您正苦于以下问题:Python FITSFigure.add_scalebar方法的具体用法?Python FITSFigure.add_scalebar怎么用?Python FITSFigure.add_scalebar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类aplpy.FITSFigure
的用法示例。
在下文中一共展示了FITSFigure.add_scalebar方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_scalebar_font
# 需要导入模块: from aplpy import FITSFigure [as 别名]
# 或者: from aplpy.FITSFigure import add_scalebar [as 别名]
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()
示例2: test_scalebar_frame
# 需要导入模块: from aplpy import FITSFigure [as 别名]
# 或者: from aplpy.FITSFigure import add_scalebar [as 别名]
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()
示例3: test_scalebar_length
# 需要导入模块: from aplpy import FITSFigure [as 别名]
# 或者: from aplpy.FITSFigure import add_scalebar [as 别名]
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()
示例4: test_scalebar_showhide
# 需要导入模块: from aplpy import FITSFigure [as 别名]
# 或者: from aplpy.FITSFigure import add_scalebar [as 别名]
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()
示例5: test_scalebar_addremove
# 需要导入模块: from aplpy import FITSFigure [as 别名]
# 或者: from aplpy.FITSFigure import add_scalebar [as 别名]
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()
示例6: test_scalebar_alpha
# 需要导入模块: from aplpy import FITSFigure [as 别名]
# 或者: from aplpy.FITSFigure import add_scalebar [as 别名]
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()
示例7: test_scalebar_color
# 需要导入模块: from aplpy import FITSFigure [as 别名]
# 或者: from aplpy.FITSFigure import add_scalebar [as 别名]
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()
示例8: test_scalebar_corner
# 需要导入模块: from aplpy import FITSFigure [as 别名]
# 或者: from aplpy.FITSFigure import add_scalebar [as 别名]
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()
示例9: test_scalebar_label
# 需要导入模块: from aplpy import FITSFigure [as 别名]
# 或者: from aplpy.FITSFigure import add_scalebar [as 别名]
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()
示例10: test_scalebar_add_invalid
# 需要导入模块: from aplpy import FITSFigure [as 别名]
# 或者: from aplpy.FITSFigure import add_scalebar [as 别名]
def test_scalebar_add_invalid():
data = np.zeros((16, 16))
f = FITSFigure(data)
with pytest.raises(TypeError):
f.add_scalebar()