You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Stretch the contrast of the red channel only, resulting in a more red image
57
-
fig <- plot_ly(type="image", z=img*250,
57
+
fig <- plot_ly(type="image", z=img*250,
58
58
zmin=c(10, 0, 0), zmax=c(200, 250, 250))
59
59
fig
60
60
```
61
-
### Set Ticks and Margins
61
+
### Set Ticks and Margins
62
62
63
63
```{r}
64
64
library(plotly)
@@ -74,11 +74,11 @@ fig
74
74
75
75
### Drawing Shapes on Images
76
76
77
-
You can create layout shapes programatically, but you can also draw shapes manually by setting the `dragmode` to one of the shape-drawing modes: `drawline`,`drawopenpath`, `drawclosedpath`, `drawcircle`, or `drawrect`. If you need to switch between different shape-drawing or other dragmodes (panning, selecting, etc.), modebar buttons can be added in the `config` of your figure to select the dragmode.
77
+
You can create layout shapes programatically, but you can also draw shapes manually by setting the `dragmode` to one of the shape-drawing modes: `drawline`,`drawopenpath`, `drawclosedpath`, `drawcircle`, or `drawrect`. If you need to switch between different shape-drawing or other dragmodes (panning, selecting, etc.), modebar buttons can be added in the `config` of your figure to select the dragmode.
78
78
79
79
If you switch to a different dragmode such as pan or zoom, you will need to select the drawing tool in the modebar to go back to shape drawing.
80
80
81
-
This shape-drawing feature is particularly interesting for annotating graphs, in particular [image traces](https://plotly.com/r/displaying-images/).
81
+
This shape-drawing feature is particularly interesting for annotating graphs, in particular [image traces](https://plotly.com/r/displaying-images/).
82
82
83
83
Once you have drawn shapes, you can select and modify an existing shape by clicking on its boundary (note the arrow pointer). Its fillcolor turns to pink to highlight the activated shape and then you can
fig <- layout(fig, dragmode="drawrect", xaxis = list(title = 'Click and drag inside the figure to draw a rectangle or select another shape in the modebar'))
104
104
@@ -110,4 +110,4 @@ fig
110
110
```
111
111
112
112
### Reference
113
-
See [https://plotly.com/r/reference/#image](https://plotly.com/r/reference/#area) for more information and chart attribute options!
113
+
See [https://plotly.com/r/reference/#image](https://plotly.com/r/reference/#area) for more information and chart attribute options!
Visualize Principle Component Analysis (PCA) of your high-dimensional data in R with Plotly.
20
19
21
20
This page first shows how to visualize higher dimension data using various Plotly figures combined with dimensionality reduction (aka projection). Then, we dive into the specific details of our projection algorithm.
0 commit comments