Comments (6)
@rpkyle @sacul-git @HammadTheOne any strong feelings here?
from plotly.r-docs.
@nicolaskruchten is this just for readability? I personally tend to use something along the lines of the original example, creating the fig
in one go rather than creating it and overwriting, but what are the disadvantages to having something like this in the documentation?
fig <- plot_ly(x = ~s, y = ~s) %>%
layout(xaxis = a, yaxis = a)
fig
from plotly.r-docs.
I don't feel too strongly about it, but from a user standpoint, the rewritten version might be better to follow for individuals who aren't as familiar with the tidyverse
. In their style guide they actually recommend using shorter pipes for readability, so the rewrite is a better option from that standpoint.
from plotly.r-docs.
@sacul-git the idea is to more clearly break out the various steps for users, so they can copy-paste individual lines into their script more easily:
fig <- plot_ly(x = ~s, y = ~s) # create fig
fig <- fig %>% layout(xaxis = a, yaxis = a) # mutate fig
fig # display fig
from plotly.r-docs.
agreed on that on the command-line you would likely just use the pipe without any assignment :)
from plotly.r-docs.
For posterity's sake, just noting here that I made a comment along the lines of what @sacul-git said above to @nicolaskruchten, but the explanation (being able to easily copy the line and reuse) makes a lot of sense, so I have no objections to this syntax personally.
from plotly.r-docs.
Related Issues (20)
- Outdated documention: deprecated orca package HOT 1
- ggplotly setting graph size HOT 1
- Missing mapbox choropleth docs in R HOT 1
- ggplot2 getting started still talks about chart studio HOT 1
- default color scheme for plotly contour plot lines
- non-mapbox choropleth page
- Last example in image trace doesn't show up
- Credential issue and lexical error for invalid character in json text. HOT 6
- mistake in example network graph
- Documentation and forum post for changes since 4.9.2
- Suggestion: Add reference link for more information
- curvature to the lines between nodes HOT 2
- Impossible to rotate y-axis title HOT 1
- Mistake in documentation of ggplotly box plots
- Examples charts not showing HOT 2
- plotly.express & px.parallel_categorie does not show the map and any info HOT 3
- 3D surface plots
- Unresponsive Legend for Ggplot HOT 1
- Article for Exporting Static Image with Orca outdated. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plotly.r-docs.