Skip to content

Commit

Permalink
bump version; support for lists in vline and hline
Browse files Browse the repository at this point in the history
  • Loading branch information
glamp committed Apr 28, 2014
1 parent ac2ff13 commit 4e95d6c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ggplot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def _set_mpl_backend():
# This is the only place the version is specified and
# used in both setup.py and docs/conf.py to set the
# version of ggplot.
__version__ = '0.5.4'
__version__ = '0.5.5'

from .qplot import qplot
from .ggplot import ggplot
Expand Down
10 changes: 8 additions & 2 deletions ggplot/geoms/geom_hline.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ class geom_hline(geom):

def _plot_unit(self, pinfo, ax):
pinfo['label'] = self.params['label']
ax.axhline(**pinfo)

pinfo['label'] = self.params['label']
if isinstance(pinfo['y'], list):
ys = pinfo['y']
for y in ys:
pinfo['y'] = y
ax.axhline(**pinfo)
else:
ax.axhline(**pinfo)

8 changes: 7 additions & 1 deletion ggplot/geoms/geom_vline.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ class geom_vline(geom):

def _plot_unit(self, pinfo, ax):
pinfo['label'] = self.params['label']
ax.axvline(**pinfo)
if isinstance(pinfo['x'], list):
xs = pinfo['x']
for x in xs:
pinfo['x'] = x
ax.axvline(**pinfo)
else:
ax.axvline(**pinfo)

2 comments on commit 4e95d6c

@has2k1
Copy link

@has2k1 has2k1 commented on 4e95d6c Apr 28, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have this properly covered in #266, including functions to calculate the slopes and intercepts.

@glamp
Copy link
Contributor Author

@glamp glamp commented on 4e95d6c Apr 28, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok i'll merge yours in. just let me know when it's ready

Please sign in to comment.