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

A more convenient constructor for Curve #133

Closed
jlstevens opened this issue Jun 3, 2015 · 2 comments
Closed

A more convenient constructor for Curve #133

jlstevens opened this issue Jun 3, 2015 · 2 comments
Labels

Comments

@jlstevens
Copy link
Contributor

People used to matplotlib may find the requirement to supply the x values to a Curve annoying. I don't see why the Curve constructor couldn't just take a list/array of y-values and automatically generate the x-values by the index.

philippjfr added a commit that referenced this issue Jun 3, 2015
This simplifies constructing simple plots without supplying
explicit x-values. This more closely matches the matplotlib
API making it easier for new users to get started and
addresses issue #133.
@philippjfr
Copy link
Member

I've added the new constructor in the commit above. All Chart Element types may now be instantiated with a simple iterable of y-values, e.g. this is now valid:

hv.Curve(range(10))

image

I'll close the issue now.

@jlstevens
Copy link
Contributor Author

Ok great!

Now we must remember that the reason for this change is so that Curve is just as usable for quick plotting as plt.plot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants