Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Added property getters for color and linewidth in BaseFrame #203

Merged
merged 1 commit into from
May 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
0.8 (unreleased)
----------------

- No changes yet.
- Added property getters for color and linewidth in BaseFrame. [#203]

0.7 (2016-05-06)
----------------
Expand Down
6 changes: 6 additions & 0 deletions wcsaxes/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ def set_color(self, color):
"""
self._color = color

def get_color(self):
return self._color

def set_linewidth(self, linewidth):
"""
Sets the linewidth of the frame.
Expand All @@ -174,6 +177,9 @@ def set_linewidth(self, linewidth):
"""
self._linewidth = linewidth

def get_linewidth(self):
return self._linewidth

@abc.abstractmethod
def update_spines(self):
raise NotImplementedError("")
Expand Down
5 changes: 4 additions & 1 deletion wcsaxes/tests/test_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ def test_overlay_features_image(self):
ax.coords.frame.set_color('red')
ax.coords.frame.set_linewidth(2)

assert ax.coords.frame.get_color() == 'red'
assert ax.coords.frame.get_linewidth() == 2

return fig

@remote_data
Expand Down Expand Up @@ -451,7 +454,7 @@ def test_patches_distortion(self, tmpdir):
edgecolor='purple', facecolor='none',
transform=ax.get_transform('fk5'))
ax.add_patch(r)

ax.coords[0].set_ticklabel_visible(False)
ax.coords[1].set_ticklabel_visible(False)

Expand Down