Пример #1
0
fi.enable_autocuts('on')
fi.set_autocut_params('zscale')
#fi.set_cmap(cmap.get_cmap('rainbow3'))
fi.set_figure(fig)

# enable all interactive ginga features
fi.get_bindings().enable_all(True)

# load an image
if len(sys.argv) < 2:
    print "Please provide a FITS file on the command line"
    sys.exit(1)
    
image = AstroImage(logger)
image.load_file(sys.argv[1])
fi.set_image(image)
#fi.rotate(45)

# plot some example graphics via matplotlib

# Note adding axis from ginga (mpl backend) object
ax = fi.add_axes()
ax.hold(True)

wd, ht = image.get_size()
# plot a line
l = ax.plot((wd*0.33, wd*0.75), (ht*0.5, ht*0.75), 'go-',
            c="g",
            label='line1')
# a rect
r = patches.Rectangle((wd*0.10, ht*0.10), wd*0.6, ht*0.5, ec='b',