Skip to content

Commit

Permalink
Rename 'marker_alignment' to 'alignment'
Browse files Browse the repository at this point in the history
  • Loading branch information
corranwebster committed Aug 19, 2014
1 parent 041b005 commit 4fd6f9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions chaco/scatterplot_1d.py
Expand Up @@ -68,7 +68,7 @@ class ScatterPlot1D(Base1DPlot):
selection_outline_color = black_color_trait

#: alignment of markers relative to non-index direction
marker_alignment = Enum("center", "left", "right", "top", "bottom")
alignment = Enum("center", "left", "right", "top", "bottom")

#: offset of markers relative to non-index direction in pixels
marker_offset = Float
Expand Down Expand Up @@ -131,11 +131,11 @@ def _get_marker_position(self):
if self.orientation == 'v':
y, h = x, w

if self.marker_alignment == 'center':
if self.alignment == 'center':
position = y + h/2.0
elif self.marker_alignment in ['left', 'bottom']:
elif self.alignment in ['left', 'bottom']:
position = y
elif self.marker_alignment in ['right', 'top']:
elif self.alignment in ['right', 'top']:
position = y + h

position += self.marker_offset
Expand All @@ -153,5 +153,5 @@ def _orientation_changed(self):
super(ScatterPlot1D, self)._orientation_changed()
self._marker_position = self._get_marker_position()

def _marker_alignment_changed(self):
def _alignment_changed(self):
self._marker_position = self._get_marker_position()
4 changes: 2 additions & 2 deletions examples/demo/basic/scatter_1d.py
Expand Up @@ -50,7 +50,7 @@ def _create_plot_component():
type='scatter_1d',
orientation='h',
marker='plus',
marker_alignment='bottom'
alignment='bottom'
)

plot.plot_1d(
Expand All @@ -66,7 +66,7 @@ def _create_plot_component():
type='scatter_1d',
orientation='v',
marker='plus',
marker_alignment='left'
alignment='left'
)

plot.plot(("index", "value"),
Expand Down

0 comments on commit 4fd6f9f

Please sign in to comment.