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

slightly exaggerated PyPlot example in the manual #719

Closed
stevengj opened this issue Mar 6, 2017 · 5 comments
Closed

slightly exaggerated PyPlot example in the manual #719

stevengj opened this issue Mar 6, 2017 · 5 comments

Comments

@stevengj
Copy link
Contributor

stevengj commented Mar 6, 2017

The PyPlot [example in the manual](https://juliaplots.github.io/pipeline/ seems a lot more complicated than necessary. The simplest analogue of the using Plots; plot(...) example in the manual would be

using PyPlot
figure(figsize=(4,3), dpi=100)
plot(x, y[:,1], alpha = 0.5, "steelblue", linewidth = 4)
scatter(x, y[:,2], alpha = 0.5, marker = "+", s = 100, c="orangered")
plt[:hist](y[:,3], orientation = "horizontal", alpha = 0.5,
                   normed = true, bins=30, color="green",
                   linewidth = 0)
grid()
title("My title")
legend(["y1","y2"])
@stevengj
Copy link
Contributor Author

stevengj commented Mar 6, 2017

Also, a lot of the complexity here is simply that Matplotlib has different defaults than Plots. If you are willing to accept more of Matplotlib's defaults (since you were willing to accept Plots' defaults), you can do:

using PyPlot
plot(x, y[:,1], alpha = 0.5, linewidth = 4)
plot(x, y[:,2], alpha = 0.5, "r+")
plt[:hist](y[:,3], orientation = "horizontal", alpha = 0.5, normed = true)
grid()
title("My title")
legend(["y1","y2"])

@stevengj
Copy link
Contributor Author

stevengj commented Mar 6, 2017

(Plots is a great package, but I don't think the current comparison to PyPlot is informative.)

@tbreloff
Copy link
Member

tbreloff commented Mar 6, 2017 via email

@tbreloff
Copy link
Member

tbreloff commented Mar 6, 2017 via email

@stevengj
Copy link
Contributor Author

stevengj commented Mar 6, 2017

Fair enough, thanks!

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

3 participants