Created
September 16, 2016 18:51
-
-
Save rgbkrk/58385d5436be245950d793c3e875bbf8 to your computer and use it in GitHub Desktop.
iris plotting with custom plotly mimetype
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| layout = list( | |
| scene=list( | |
| xaxis=list(title="sepal length [cm]"), | |
| yaxis=list(title="sepal width [cm]"), | |
| zaxis=list(title="petal length [cm]") | |
| ), | |
| title="Iris dataset" | |
| ) | |
| data = list( | |
| x=iris$Sepal.Length, | |
| y=iris$Sepal.Width, | |
| z=iris$Petal.Length, | |
| marker=list( | |
| line=list(color="black", width=1), | |
| opacity=0.7, | |
| size=12 | |
| ), | |
| mode="markers", | |
| name="Iris-setosa", | |
| type="scatter3d" | |
| ) | |
| figure = list(data=data, layout=layout) | |
| IRdisplay::publish_mimebundle(list('application/vnd.plotly.v1+json'=figure)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment