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
Copy file name to clipboardExpand all lines: r/2015-07-30-time-series.Rmd
+14-20Lines changed: 14 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -30,29 +30,23 @@ fig
30
30
```
31
31
32
32
### Hiding Weekends and Holidays
33
+
The `rangebreaks` attribute available on x- and y-axes of type date can be used to hide certain time-periods. In the example below, we create a plot of the last ten days, excluding Saturdays, Sundays, yesterday, and the day before yesterday. Check out the reference for more options: https://plotly.com/r/reference/#layout-xaxis-rangebreaks
Copy file name to clipboardExpand all lines: r/2015-11-19-shapes.Rmd
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,7 @@ You can create layout shapes programatically, but you can also draw shapes manua
102
102
103
103
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.
104
104
105
-
This shape-drawing feature is particularly interesting for annotating graphs, in particular [image traces](https://plotly.com/r/displaying-images/).
105
+
This shape-drawing feature is particularly interesting for annotating graphs, in particular [image traces](https://plotly.com/r/displaying-images/#drawing-shapes-on-images).
106
106
107
107
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
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
+
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
+
81
+
This shape-drawing feature is particularly interesting for annotating graphs, in particular [image traces](https://plotly.com/r/displaying-images/).
82
+
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
84
+
85
+
- drag and resize it for lines, rectangles and circles/ellipses
86
+
- drag and move individual vertices for closed paths
87
+
- move individual vertices for open paths.
88
+
89
+
An activated shape is deleted by cliking on the `eraseshape` button.
90
+
91
+
Drawing or modifying a shape triggers a `relayout` event, which [can be captured by a callback inside a Dash For R application](https://dash.plotly.com/interactive-graphing).
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'))
0 commit comments