Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial steps to python3 compatabilityPython3 compatability... #21

Merged
merged 1 commit into from
Oct 16, 2013

Conversation

bwillers
Copy link

Made the necessary edits to get the example.py file to run on:
Python 3.3.2
matplotlib 1.3.1
pandas 0.12.0

Clearly more testing is required, but at least now the example file runs :)

Made the necessary edits to get the example.py file to run on:
Python 3.3.2
matplotlib 1.3.1
pandas 0.12.0

Clearly more testing is required, but at least now the example file runs :)

Ammended: fixed bug where example data wouldnt load if run from
          different folder than ggplot/ggplot
<<<<<<< HEAD
import os
=======
>>>>>>> d212a5a4e7fa75dd468ea2f284609595f51e702e

Choose a reason for hiding this comment

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

FYI, you accidentally left some git merge junk in the file.

Copy link
Author

Choose a reason for hiding this comment

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

Ah, crap, so I have. Let me fix that - kind of new to git :)

@stonebig
Copy link
Contributor

Hello,

I'm deeply impressed by ggplot and your py3 branch.
Trying to reproduce all the examples from http://blog.yhathq.com/posts/ggplot-for-python.html), I get a

runtimeError: maximum recursion depth exceeded while calling a Python object

at this one example below (under python3.3, ipython 1.0, matplotlib 1.3.0, via winpython3.3.2.3)

from ggplot import *
print (ggplot(meat, aes('date','beef')) + \
    geom_line(color='black') + \
    scale_x_date(breaks=date_breaks('7 years'), labels='%b %Y') + \
    scale_y_continuous(labels='comma'))

it seems it loop inside itself in matplotlib\dates.py.
Do you have the same phenomenon ?
==> Is it related to my matplotlib not being1.3.1 ?

C:\Users\famille\Documents\winpython\WinPython-32bit-3.3.2.3ggplot\python-3.3.2\lib\site-packages\matplotlib\dates.py in __getattr__(self, name)
    539         if name in self.__dict__:
    540             return self.__dict__[name]
--> 541         return getattr(self._rrule, name)
    542 
    543 

C:\Users\famille\Documents\winpython\WinPython-32bit-3.3.2.3ggplot\python-3.3.2\lib\site-packages\matplotlib\dates.py in __getattr__(self, name)
    539         if name in self.__dict__:
    540             return self.__dict__[name]
--> 541         return getattr(self._rrule, name)
    542 
    543  

@@ -4,13 +4,13 @@
from datetime import timedelta
import numpy as np
from copy import deepcopy
from geom import geom
from .geom import geom
Copy link
Contributor

Choose a reason for hiding this comment

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

will this work in 2.7?

Copy link
Author

Choose a reason for hiding this comment

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

Runs on my 2.7.5 installation, haven't had a chance to test with earlier versions.

Relevant SO entry: http://stackoverflow.com/questions/12172791/changes-in-import-statement-python3

Copy link
Contributor

Choose a reason for hiding this comment

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

cool looks good

@glamp glamp merged commit 23ae844 into yhat:master Oct 16, 2013
@bwillers bwillers deleted the py3 branch October 16, 2013 21:16
stonebig added a commit to stonebig/ggplot that referenced this pull request Oct 17, 2013
continuation of the action yhat#21
@stonebig stonebig mentioned this pull request Oct 17, 2013
stonebig added a commit to stonebig/ggplot that referenced this pull request Oct 17, 2013
continuation of the action yhat#21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants