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

draw_ellipse missing from astroML v1.0 #225

Open
gtrichards opened this issue Aug 27, 2020 · 0 comments
Open

draw_ellipse missing from astroML v1.0 #225

gtrichards opened this issue Aug 27, 2020 · 0 comments

Comments

@gtrichards
Copy link

I'm trying to run the example of Figure 6.6 (2nd edition: http://www.astroml.org/book_figures/chapter6/fig_EM_metallicity.html).

However, draw_ellipse seems to be missing. The error doesn't make sense to me:

ImportError: cannot import name 'LinearRegressionwithErrors' from 'astroML.linear_model' (/Users/gtr/opt/anaconda3/lib/python3.8/site-packages/astroML/linear_model/init.py)

However, I see "draw_ellipse" in tools.py at
~/anaconda3/lib/python3.8/site-packages/astroML/plotting

I managed to get it to work with by importing:
from matplotlib.patches import Ellipse

And then copying draw_elllipse from tools.py:
def draw_ellipse(mu, C, scales=[1, 2, 3], ax=None, **kwargs):

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

1 participant