|
def | __init__ (self, display, verbose=False, interpretMaskBits=True, mtvOrigin=afwImage.PARENT, fastMaskDisplay=False, reopenPlot=False, useSexagesimal=False, dpi=None, *args, **kwargs) |
|
def | savefig (self, *args, **kwargs) |
|
def | show_colorbar (self, show=True, where="right", axSize="5%", axPad=None, **kwargs) |
|
def | useSexagesimal (self, useSexagesimal) |
|
def | wait (self, prompt="[c(ontinue) p(db)] :", allowPdb=True) |
|
|
def | _close (self) |
| Close the display, cleaning up any allocated resources.
|
|
def | _show (self) |
|
def | _setMaskTransparency (self, transparency, maskplane) |
|
def | _getMaskTransparency (self, maskplane=None) |
|
def | _mtv (self, image, mask=None, wcs=None, title="") |
|
def | _i_mtv (self, data, wcs, title, isMask) |
|
def | _i_setImage (self, image, mask=None, wcs=None) |
|
def | _setImageColormap (self, cmap) |
|
def | _buffer (self, enable=True) |
|
def | _flush (self) |
|
def | _erase (self) |
|
def | _dot (self, symb, c, r, size, ctype, fontFamily="helvetica", textAngle=None) |
|
def | _drawLines (self, points, ctype) |
|
def | _scale (self, algorithm, minval, maxval, unit, *args, **kwargs) |
|
def | _i_scale (self, algorithm, minval, maxval, unit, *args, **kwargs) |
|
def | _zoom (self, zoomfac) |
|
def | _pan (self, colc, rowc) |
|
def | _getEvent (self, timeout=-1) |
|
Provide a matplotlib backend for afwDisplay
Recommended backends in notebooks are:
%matplotlib notebook
or
%matplotlib ipympl
or
%matplotlib qt
%gui qt
or
%matplotlib inline
or
%matplotlib osx
Apparently only qt supports Display.interact(); the list of interactive
backends is given by lsst.display.matplotlib.interactiveBackends
def lsst.display.matplotlib.matplotlib.DisplayImpl.__init__ |
( |
|
self, |
|
|
|
display, |
|
|
|
verbose = False , |
|
|
|
interpretMaskBits = True , |
|
|
|
mtvOrigin = afwImage.PARENT , |
|
|
|
fastMaskDisplay = False , |
|
|
|
reopenPlot = False , |
|
|
|
useSexagesimal = False , |
|
|
|
dpi = None , |
|
|
* |
args, |
|
|
** |
kwargs |
|
) |
| |
Initialise a matplotlib display
@param fastMaskDisplay If True only show the first bitplane that's
set in each pixel
(e.g. if (SATURATED & DETECTED)
ignore DETECTED)
Not really what we want, but a bit faster
@param interpretMaskBits Interpret the mask value under the cursor
@param mtvOrigin Display pixel coordinates with LOCAL origin
(bottom left == 0,0 not XY0)
@param reopenPlot If true, close the plot before opening it.
(useful with e.g. %ipympl)
@param useSexagesimal If True, display coordinates in sexagesimal
E.g. hh:mm:ss.ss (default:False)
May be changed by calling
display.useSexagesimal()
@param dpi Number of dpi (passed to pyplot.figure)
The `frame` argument to `Display` may be a matplotlib figure; this
permits code such as
fig, axes = plt.subplots(1, 2)
disp = afwDisplay.Display(fig)
disp.scale('asinh', 'zscale', Q=0.5)
for axis, exp in zip(axes, exps):
plt.sca(axis) # make axis active
disp.mtv(exp)
def lsst.display.matplotlib.matplotlib.DisplayImpl._dot |
( |
|
self, |
|
|
|
symb, |
|
|
|
c, |
|
|
|
r, |
|
|
|
size, |
|
|
|
ctype, |
|
|
|
fontFamily = "helvetica" , |
|
|
|
textAngle = None |
|
) |
| |
|
protected |
Draw a symbol at (col,row) = (c,r) [0-based coordinates]
Possible values are:
+ Draw a +
x Draw an x
* Draw a *
o Draw a circle
@:Mxx,Mxy,Myy Draw an ellipse with moments
(Mxx, Mxy, Myy) (argument size is ignored)
An afwGeom.ellipses.Axes Draw the ellipse (argument size is
ignored)
Any other value is interpreted as a string to be drawn. Strings obey the
fontFamily (which may be extended with other characteristics, e.g.
"times bold italic". Text will be drawn rotated by textAngle
(textAngle is ignored otherwise).