@@ -33,7 +33,7 @@ packageVersion('plotly')
33
33
```
34
34
35
35
```
36
- ## [1] '4.5.6 .9000'
36
+ ## [1] '4.8.0 .9000'
37
37
```
38
38
39
39
### Range of Axes
@@ -70,7 +70,63 @@ chart_link = api_create(p, filename="axes3d-range")
70
70
chart_link
71
71
```
72
72
73
- <iframe src =" https://plot.ly/~RPlotBot/3980.embed " width =" 800 " height =" 600 " id =" igraph " scrolling =" no " seamless =" seamless " frameBorder =" 0 " > </iframe >
73
+ <iframe src =" https://plot.ly/~RPlotBot/5529.embed " width =" 800 " height =" 600 " id =" igraph " scrolling =" no " seamless =" seamless " frameBorder =" 0 " > </iframe >
74
+
75
+ ### Fixed Ratio Axes
76
+
77
+
78
+ ``` r
79
+ library(plotly )
80
+
81
+ # custom grid style
82
+ axx <- list (
83
+ gridcolor = ' rgb(255, 255, 255)' ,
84
+ zerolinecolor = ' rgb(255, 255, 255)' ,
85
+ showbackground = TRUE ,
86
+ backgroundcolor = ' rgb(230, 230,230)'
87
+ )
88
+
89
+ # individual plots
90
+ p1 <- plot_ly(z = ~ volcano , scene = ' scene1' ) %> %
91
+ add_surface(showscale = FALSE )
92
+
93
+ p2 <- plot_ly(z = ~ volcano , scene = ' scene2' ) %> %
94
+ add_surface(showscale = FALSE )
95
+
96
+ p3 <- plot_ly(z = ~ volcano , scene = ' scene3' ) %> %
97
+ add_surface(showscale = FALSE )
98
+
99
+ p4 <- plot_ly(z = ~ volcano , scene = ' scene4' ) %> %
100
+ add_surface(showscale = FALSE )
101
+
102
+ # subplot and define scene
103
+ p <- subplot(p1 , p2 , p3 , p4 ) %> %
104
+ layout(title = " 3D Subplots" ,
105
+ scene = list (domain = list (x = c(0 ,0.5 ),y = c(0.5 ,1 )),
106
+ xaxis = axx , yaxis = axx , zaxis = axx ,
107
+
108
+ # select the type of aspectmode
109
+ aspectmode = ' cube' ),
110
+ scene2 = list (domain = list (x = c(0.5 ,1 ),y = c(0.5 ,1 )),
111
+ xaxis = axx , yaxis = axx , zaxis = axx ,
112
+ aspectmode = ' data' ),
113
+ scene3 = list (domain = list (x = c(0 ,0.5 ),y = c(0 ,0.5 )),
114
+ xaxis = axx , yaxis = axx , zaxis = axx ,
115
+ aspectmode = ' auto' ),
116
+ scene4 = list (domain = list (x = c(0.5 ,1 ),y = c(0 ,0.5 )),
117
+ xaxis = axx , yaxis = axx , zaxis = axx ,
118
+ aspectmode = ' manual' ,
119
+
120
+ # set your manual fixed aspect ratio
121
+ aspectratio = list (x = 1 , y = 1 , z = 2 )))
122
+
123
+ # Create a shareable link to your chart
124
+ # Set up API credentials: https://plot.ly/r/getting-started
125
+ chart_link = api_create(p , filename = " axes3d-range" )
126
+ chart_link
127
+ ```
128
+
129
+ <iframe src =" https://plot.ly/~RPlotBot/5529.embed " width =" 800 " height =" 600 " id =" igraph " scrolling =" no " seamless =" seamless " frameBorder =" 0 " > </iframe >
74
130
75
131
### Set Axes Title
76
132
@@ -103,7 +159,7 @@ chart_link = api_create(p, filename="axes3d-title")
103
159
chart_link
104
160
```
105
161
106
- <iframe src =" https://plot.ly/~RPlotBot/3982 .embed " width =" 800 " height =" 600 " id =" igraph " scrolling =" no " seamless =" seamless " frameBorder =" 0 " > </iframe >
162
+ <iframe src =" https://plot.ly/~RPlotBot/5531 .embed " width =" 800 " height =" 600 " id =" igraph " scrolling =" no " seamless =" seamless " frameBorder =" 0 " > </iframe >
107
163
108
164
### Ticks Formatting
109
165
@@ -141,7 +197,7 @@ chart_link = api_create(p, filename="axes3d-ticks")
141
197
chart_link
142
198
```
143
199
144
- <iframe src =" https://plot.ly/~RPlotBot/3984 .embed " width =" 800 " height =" 600 " id =" igraph " scrolling =" no " seamless =" seamless " frameBorder =" 0 " > </iframe >
200
+ <iframe src =" https://plot.ly/~RPlotBot/5533 .embed " width =" 800 " height =" 600 " id =" igraph " scrolling =" no " seamless =" seamless " frameBorder =" 0 " > </iframe >
145
201
146
202
### Background and Grid Color
147
203
@@ -183,7 +239,7 @@ chart_link = api_create(p, filename="axes3d-bg-grid")
183
239
chart_link
184
240
```
185
241
186
- <iframe src =" https://plot.ly/~RPlotBot/3986 .embed " width =" 800 " height =" 600 " id =" igraph " scrolling =" no " seamless =" seamless " frameBorder =" 0 " > </iframe >
242
+ <iframe src =" https://plot.ly/~RPlotBot/5535 .embed " width =" 800 " height =" 600 " id =" igraph " scrolling =" no " seamless =" seamless " frameBorder =" 0 " > </iframe >
187
243
188
244
#Reference
189
245
0 commit comments