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

Python 2.7: with ppl.pretty fails #73

Closed
dpq opened this issue Jun 23, 2014 · 9 comments
Closed

Python 2.7: with ppl.pretty fails #73

dpq opened this issue Jun 23, 2014 · 9 comments

Comments

@dpq
Copy link

dpq commented Jun 23, 2014

import prettyplotlib as ppl
with ppl.pretty:
  pass

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: __exit__
@olgabot
Copy link
Owner

olgabot commented Jun 23, 2014

Which version are you using? From PyPI or from github?


Olga Botvinnik
PhD Program in Bioinformatics and Systems Biology
Gene Yeo Laboratory http://yeolab.ucsd.edu/yeolab/Home.html | Sanford
Consortium for Regenerative Medicine
University of California, San Diego
www http://olgabotvinnik.com | blog http://blog.olgabotvinnik.com/ |
github http://github.com/olgabot | twitter http://twitter.com/olgabot |
linkedin http://www.linkedin.com/in/olgabotvinnik

2014-06-23 7:26 GMT-07:00 David Parunakian notifications@github.com:

import prettyplotlib as ppl
with ppl.pretty:
pass

Traceback (most recent call last):
File "", line 1, in
AttributeError: exit


Reply to this email directly or view it on GitHub
#73.

@dpq
Copy link
Author

dpq commented Jun 24, 2014

PyPI. However, the Github version also fails with another error (just
tested):

Python 2.7.3 (default, Mar 13 2014, 11:03:55)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import prettyplotlib as ppl

with ppl.pretty:
... pass
...
Traceback (most recent call last):
File "", line 1, in
File "prettyplotlib/colors.py", line 45, in enter
context = mpl.rc_context(rc=self.rcParams)
AttributeError: 'module' object has no attribute 'rc_context'

Here we use brewer2mpl-1.4 from PyPI.

On 2014-06-23 13:02-0700, Olga Botvinnik wrote:

Which version are you using? From PyPI or from github?


Olga Botvinnik
PhD Program in Bioinformatics and Systems Biology
Gene Yeo Laboratory http://yeolab.ucsd.edu/yeolab/Home.html | Sanford
Consortium for Regenerative Medicine
University of California, San Diego
www http://olgabotvinnik.com | blog http://blog.olgabotvinnik.com/ |
github http://github.com/olgabot | twitter http://twitter.com/olgabot |
linkedin http://www.linkedin.com/in/olgabotvinnik

2014-06-23 7:26 GMT-07:00 David Parunakian notifications@github.com:

import prettyplotlib as ppl
with ppl.pretty:
pass

Traceback (most recent call last):
File "", line 1, in
AttributeError: exit


Reply to this email directly or view it on GitHub
#73.


Reply to this email directly or view it on GitHub:
#73 (comment)

@jankatins
Copy link

That looks like a very old matplotlib version:

import matplotlib as mpl
print(mpl.__version__)

We had teh same problem in ggplot: https://github.com/yhat/ggplot/blob/master/ggplot/ggplot.py#L31

@dpq
Copy link
Author

dpq commented Jun 24, 2014

1.3.1, the latest stable release

On 2014-06-24 03:37-0700, Jan Schulz wrote:

That looks like a very old matplotlib version:

import matplotlib as mpl
print(mpl.__version__)

Reply to this email directly or view it on GitHub:
#73 (comment)

@olgabot
Copy link
Owner

olgabot commented Jun 25, 2014

This is very strange! Can you print out all your python packages (pip list) and post it as a gist (https://gist.github.com/) ?

@ngaloppo
Copy link

I have the same problem. Also running matplotlib version 1.3.1 with Anaconda python install on Windows 7.

@ngaloppo
Copy link

@JackStouffer
Copy link

+1 I have this issue as well with matplotlib 1.4.0 and ppl 0.1.7

@olgabot
Copy link
Owner

olgabot commented Oct 6, 2014

Thank you for your comment. Unfortunately, I no longer have the bandwidth to maintain prettyplotlib. I recommend using seaborn. Using seaborn, to get the prettyplotlib style, do:

import seaborn as sns
sns.set(style='ticks', palette='Set2')

And to remove "chartjunk", do:

sns.despine()

If you have discrete pull requests, I will accept them, but I personally will no longer fix bugs.

If you are a biological scientist looking for ways to analyze your big-ish (20+ samples) data, check out my main project, flotilla.

@olgabot olgabot closed this as completed Oct 6, 2014
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

No branches or pull requests

5 participants