From e9b2b111e1be4ae708262f09df75fa956c370282 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Sat, 24 Jun 2017 19:01:51 -0400 Subject: [PATCH] Minor fixes --- glue/viewers/image/composite_array.py | 9 +-------- glue/viewers/image/qt/data_viewer.py | 2 +- glue/viewers/image/state.py | 4 ++-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/glue/viewers/image/composite_array.py b/glue/viewers/image/composite_array.py index 6287037eb..054b5e5d7 100644 --- a/glue/viewers/image/composite_array.py +++ b/glue/viewers/image/composite_array.py @@ -5,7 +5,6 @@ import numpy as np -from matplotlib.transforms import TransformedBbox from matplotlib.colors import ColorConverter, Colormap from astropy.visualization import (LinearStretch, SqrtStretch, AsinhStretch, LogStretch, ManualInterval, ContrastBiasStretch) @@ -23,9 +22,7 @@ class CompositeArray(object): - def __init__(self, ax, **kwargs): - - self.axes = ax + def __init__(self, **kwargs): # We keep a dictionary of layers. The key should be the UUID of the # layer artist, and the values should be dictionaries that contain @@ -34,10 +31,6 @@ def __init__(self, ax, **kwargs): self._first = True - # ax.set_ylim((df[y].min(), df[y].max())) - # ax.set_xlim((df[x].min(), df[x].max())) - # self.set_array([[1, 1], [1, 1]]) - def allocate(self, uuid): self.layers[uuid] = {'zorder': 0, 'visible': True, diff --git a/glue/viewers/image/qt/data_viewer.py b/glue/viewers/image/qt/data_viewer.py index a02e5c4b6..c3c6c5b36 100644 --- a/glue/viewers/image/qt/data_viewer.py +++ b/glue/viewers/image/qt/data_viewer.py @@ -57,7 +57,7 @@ def __init__(self, session, parent=None): self.state.add_callback('y_att', self._set_wcs) self.state.add_callback('slices', self._set_wcs) self.state.add_callback('reference_data', self._set_wcs) - self.axes._composite = CompositeArray(self.axes) + self.axes._composite = CompositeArray() self.axes._composite_image = imshow(self.axes, self.axes._composite, origin='lower', interpolation='nearest') diff --git a/glue/viewers/image/state.py b/glue/viewers/image/state.py index f5bc4ad82..31871c530 100644 --- a/glue/viewers/image/state.py +++ b/glue/viewers/image/state.py @@ -159,9 +159,9 @@ class ImageLayerState(MatplotlibLayerState): 'layer before rendering') cmap = DDCProperty(docstring='The colormap used to render the layer') stretch = DDCProperty('linear', docstring='The stretch used to render the layer, ' - 'whcih should be one of ``linear``', + 'whcih should be one of ``linear``' '``sqrt``, ``log``, or ``arcsinh``') - global_sync = DDCProperty(True, docstring='Whether the color and transparency ', + global_sync = DDCProperty(True, docstring='Whether the color and transparency ' 'should be synced with the global ' 'color and transparency for the data')