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

Commit

Permalink
Merge 8be1a3a into af164ad
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed May 24, 2016
2 parents af164ad + 8be1a3a commit daea4af
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
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

0 comments on commit daea4af

Please sign in to comment.