Skip to content

Flesh out ggplot2 chart types in new API docs repo #63

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

Closed
jackparmer opened this issue May 8, 2015 · 3 comments
Closed

Flesh out ggplot2 chart types in new API docs repo #63

jackparmer opened this issue May 8, 2015 · 3 comments
Assignees

Comments

@jackparmer
Copy link
Contributor

At sales demos, folks who use ggplot2 in general have no interest in Plotly's native R library.

Can we make an equivalent ggplot2 example for every plot.ly/R chart type at the new API documentation repo - https://github.com/plotly/documentation/tree/gh-pages?

For example, there is not ggplot2 hover text example equivalent to:
https://plot.ly/r/text-and-annotations/

Would be cool to reach parity between ggplot2 and plot.ly/R chart types. Its pretty cumbersome right now to demo ggplot2 functionality in sales meetings - ideally there are just copy/paste examples with the same breadth as https://plot.ly/r/

@mkcor
Copy link
Contributor

mkcor commented May 12, 2015

Funny, this is from a recent email thread of mine with user Agus:
"""
Hi again Agus,

Sure, please use the text aesthetic:

gg <- ggplot(data=df) +
  geom_point(aes(x=mpg, y=hp, text=ID, color=cyl))

py <- plotly()

py$ggplotly(gg, kwargs=list(filename="ID_tooltip", fileopt="overwrite"))

which yields https://plot.ly/~marianne2/1415
"""

Where did you get the information on argument "text" within
geom_point()? I had never seen it
and actually does not have any visual effect on the ggplot graphic.
Thanks
Agus

"""
I didn't find it in the ggplot2 docs... but it works syntax-wise
(btw, I like this tool:
http://cpsievert.github.io/2014/06/visualizing-ggplot2-internals-with-shiny-and-d3/)
and it's supported in plotly:
https://plot.ly/r/reference/#scatter-text
"""
and I Bcc'ed @cpsievert.

@cpsievert
Copy link
Contributor

At sales demos, folks who use ggplot2 in general have no interest in Plotly's native R library.

As an avid ggplot2/R user, I can relate, but I think if we provide a cleaner interface with smart defaults, it would be more attractive. I'd like to play around with idea in my redesign the R API. For instance, I think creating a 3D surface plots (which the ggplot2 DSL doesn't natively support) could be as easy as:

library(plotly)
plotly(volcano, type = "surface")

Since the redesign will effect documentation, I'd like to focus on the redesign first.

By the way, I was anticipating to see that documentation show up here, but it doesn't, am I missing something? -> http://plotly.github.io/documentation

We could also utilize the gh-pages branch on the R package repo for documentation (which currently doesn't have very much). I have some experience powering Jekyll blogs with knitr, so that's an option too.

cc @chriddyp @13bzhang

@jackparmer
Copy link
Contributor Author

+1! This would be awesome @cpsievert

library(plotly)
plotly(volcano, type = "surface")

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

No branches or pull requests

4 participants