Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f2e885e

Browse files
committed
Merge branch 'source' of github.com:plotly/documentation into source
2 parents 4fef951 + 4431e9e commit f2e885e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+6822
-129
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

TODO

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -28,45 +28,6 @@
2828
-filter toyota out of annotations
2929

3030
# Graph reference
31-
- 'font' type is confusing
32-
- 'any' is usually just a string or a number
33-
- remove *'s from + in flaglist description, the + isn't language specific
34-
- remove 'strict' from string description - it isn't used anywhere?
35-
- remove uid?
36-
- better name for 'extras'
37-
- explain 'mode' better
38-
- #layout-legend-x correct? between -2 and 3? and what are 'normalized coordinates'
39-
- tyop #layout-legend-xanchor
40-
- description in shapes, annotations
41-
- valid 'dash' styles? #scatter-line-dash
42-
- greater than, or greater than or equal to? e.g. maxdisplayed
43-
- tyop #scatter-marker-colorbar-thicknessmode - missing *
44-
- tyop #scatter-marker-colorbar-x bounds are missing
45-
- copy_zstyle in 2d error bars? #scatter-error_x-copy_zstyle
46-
- add x1 to axisid type
47-
- is 'auto' always allowed in the angle type?
48-
- im changing info_array to array
49-
- #layout-xaxis-range - explain how to normalize coordinates w log and datetime
50-
- is info_array always 2D?
51-
- include an example (or example key) for tickfont, tickformat, others?
52-
- missing period in scatter description: and Text (app...
53-
- missing period in scatter description: x and y Text (app...
54-
- Has only an effect if is set to a numerical array -- should be right? #scatter-marker-line-colorscale
55-
- Has only an effect if marker.color.line is set to a numerical array -- should be marker.color.line.color right? #scatter-marker-line-colorscale
56-
- '(ragged or not)' ? what does ragged mean? in #heatmap
57-
- replace e.g. marker.size with 'marker' in 'size'
58-
- colorbar in histogram?
59-
- better description of data_array
60-
- missing period: 'anchor This anchor ' #histogram2d-colorbar-xanchor
61-
#layout-font? - default: {"family"=>"\"Open sans\", verdana, arial, sans-serif", "size"=>12, "color"=>"#444"}
62-
human readable python trace name?
63-
descriptions on object keys, like scatter.marker, or scatter.marker.line
64-
font tooltip content is messed up
31+
- font dflt?
6532
how to include trace layout properties?
66-
dash types
67-
remove smith from layout?
68-
describe _isSubplotObj
69-
try two column intro code block to make comments easier to read
70-
does python use Axis or XAxis?
71-
whats the forward slash in the yref regex? "/^y[0-9]/"$"
72-
describe plotly_build in R somewhere, somehow
33+
arrowhead string types

_config_dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ gems:
44
BASE_URL: http://localhost:4000
55
staticurl: http://localhost:4000/all_static
66
# all of the posts: ['*.Rmd','_posts/2015-09-09-matlab-reference.html','_posts/2015-09-06-r-reference.html','_posts/2015-09-06-python-reference.html','_posts/2015-08-19-plotly_js-reference.html','_posts/2015-04-05-ggplot2-index.html','_posts/2015-04-05-julia-index.html','_posts/2015-04-05-matlab-index.html','_posts/2015-04-05-matplotlib-index.html','_posts/2015-04-05-node_js-index.html','_posts/2015-04-05-plotly_js-index.html','_posts/2015-04-05-plotlyjs-function-reference.md','_posts/2015-04-05-python-index.html','_posts/2015-05-25-ipython-notebooks_gallery.html','_posts/2015-05-25-ipython-notebooks_index.html','_posts/2015-07-13-eula_index.html','_posts/2015-07-19-pandas.html','_posts/2015-07-26-index.html','_posts/2015-07-30-r-index.Rmd','_posts/2015-07-30-r-index.md','_posts/2015-08-20-research-box-index.html','_posts/ggplot2','_posts/julia','_posts/matlab','_posts/matplotlib','_posts/nodejs','_posts/pandas','_posts/plotly_js','_posts/python','_posts/r','_posts/tutorials','_posts/user_guide_matlab','_posts/user_guide_python']
7-
exclude: ['*.Rmd','_posts/2015-09-06-r-reference.html','_posts/2015-09-06-python-reference.html','_posts/2015-08-19-plotly_js-reference.html','_posts/2015-04-05-ggplot2-index.html','_posts/2015-04-05-julia-index.html','_posts/2015-04-05-matlab-index.html','_posts/2015-04-05-matplotlib-index.html','_posts/2015-04-05-node_js-index.html','_posts/2015-04-05-plotly_js-index.html','_posts/2015-04-05-plotlyjs-function-reference.md','_posts/2015-04-05-python-index.html','_posts/2015-05-25-ipython-notebooks_gallery.html','_posts/2015-05-25-ipython-notebooks_index.html','_posts/2015-07-13-eula_index.html','_posts/2015-07-19-pandas.html','_posts/2015-07-26-index.html','_posts/2015-07-30-r-index.Rmd','_posts/2015-07-30-r-index.md','_posts/2015-08-20-research-box-index.html','_posts/ggplot2','_posts/julia','_posts/matlab','_posts/matplotlib','_posts/nodejs','_posts/pandas','_posts/plotly_js','_posts/python','_posts/r','_posts/tutorials','_posts/user_guide_matlab','_posts/user_guide_python']
7+
exclude: ['*.Rmd','_posts/2015-09-09-matlab-reference.html','_posts/2015-08-19-plotly_js-reference.html','_posts/2015-04-05-ggplot2-index.html','_posts/2015-04-05-julia-index.html','_posts/2015-04-05-matlab-index.html','_posts/2015-04-05-matplotlib-index.html','_posts/2015-04-05-node_js-index.html','_posts/2015-04-05-plotly_js-index.html','_posts/2015-04-05-plotlyjs-function-reference.md','_posts/2015-04-05-python-index.html','_posts/2015-05-25-ipython-notebooks_gallery.html','_posts/2015-05-25-ipython-notebooks_index.html','_posts/2015-07-13-eula_index.html','_posts/2015-07-19-pandas.html','_posts/2015-07-26-index.html','_posts/2015-07-30-r-index.Rmd','_posts/2015-07-30-r-index.md','_posts/2015-08-20-research-box-index.html','_posts/ggplot2','_posts/julia','_posts/matlab','_posts/matplotlib','_posts/nodejs','_posts/pandas','_posts/plotly_js','_posts/python','_posts/r','_posts/tutorials','_posts/user_guide_matlab','_posts/user_guide_python']
88

99
offline_price: 249
1010
plotlyjs_version: 20150819b
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: "Plotly Offline Template"
3+
output: html_document
4+
---
5+
6+
To run, do:
7+
8+
```
9+
tmp <- knitr::knit_meta(clean=TRUE)
10+
knitr::knit('2015-08-20-offline-template.Rmd', 'test-plotly-offline.md')
11+
markdown::markdownToHTML('test-plotly-offline.md', 'test-plotly-offline.html')
12+
```
13+
14+
15+
```{r}
16+
library(plotly)
17+
set.seed(100)
18+
d <- diamonds[sample(nrow(diamonds), 1000), ]
19+
p <- plot_ly(d, x = carat, y = price, text = paste("Clarity: ", clarity),
20+
mode = "markers", color = carat, size = carat)
21+
p %>% offline
22+
```
23+
24+
```{r}
25+
plot_ly(economics, x = date, y = uempmed) %>%
26+
add_trace(y = fitted(loess(uempmed ~ as.numeric(date)))) %>%
27+
layout(title = "Median duration of unemployment (in weeks)",
28+
showlegend = FALSE) %>%
29+
dplyr::filter(uempmed == max(uempmed)) %>%
30+
layout(annotations = list(x = date, y = uempmed, text = "Peak", showarrow = T)) %>%
31+
offline
32+
```
33+
34+
Loops
35+
36+
```{r, results="asis"}
37+
for(i in 1:3) {
38+
fig <- list(data=list(list(x=rnorm(100), type="histogram")), layout=list(title=paste(c('plot', i, sep=" "))))
39+
cat(knit_print.offline(fig %>% offline))
40+
}
41+
```
42+
43+
Sizing
44+
45+
```{r, results="asis"}
46+
for(i in 1:3) {
47+
fig <- list(data=list(list(x=rnorm(100), type="histogram")), layout=list(title=paste(c('plot', i, sep=" "))))
48+
cat(knit_print.offline(offline(fig, height=900, width=800)))
49+
}
50+
```

_drafts/2015-08-20-offline-template.md

Lines changed: 1186 additions & 0 deletions
Large diffs are not rendered by default.

_drafts/offline-for-loop.Rmd

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
---
2+
title: "Plotly Offline Template"
3+
output: html_document
4+
---
5+
6+
```{r}
7+
library(plotly)
8+
set.seed(100)
9+
d <- diamonds[sample(nrow(diamonds), 1000), ]
10+
p <- plot_ly(d, x = carat, y = price, text = paste("Clarity: ", clarity),
11+
mode = "markers", color = carat, size = carat)
12+
p %>% offline
13+
```
14+
15+
```{r}
16+
plot_ly(economics, x = date, y = uempmed) %>%
17+
add_trace(y = fitted(loess(uempmed ~ as.numeric(date)))) %>%
18+
layout(title = "Median duration of unemployment (in weeks)",
19+
showlegend = FALSE) %>%
20+
dplyr::filter(uempmed == max(uempmed)) %>%
21+
layout(annotations = list(x = date, y = uempmed, text = "Peak", showarrow = T)) %>%
22+
offline
23+
```
24+
25+
Loops
26+
27+
```{r}
28+
fig <- list(data=list(list(x=rnorm(100))), layout=list(title=paste(c('plot ', 0))))
29+
```
30+
31+
```{r}
32+
knit_print.offline(fig)
33+
knit_print.offline(fig)
34+
```
35+
36+
37+
```{r}
38+
knit_print.offline(fig %>% offline)
39+
knit_print.offline(fig %>% offline)
40+
```
41+
42+
```{r}
43+
print(knit_print.offline(fig %>% offline))
44+
print(knit_print.offline(fig %>% offline))
45+
```
46+
47+
```{r}
48+
print(fig)
49+
print(fig)
50+
```
51+
52+
```{r}
53+
print(fig %>% offline)
54+
print(fig %>% offline)
55+
```
56+
57+
```{r}
58+
print(fig %>% offline)
59+
print(fig %>% offline)
60+
```
61+
62+
```{r, results='asis'}
63+
for(i in 1:2) {
64+
knit_print.offline(fig %>% offline)
65+
}
66+
```
67+
68+
```{r}
69+
for(i in 1:2) {
70+
knit_print.offline(fig %>% offline)
71+
}
72+
```
73+
74+
```{r}
75+
new_offline <- function(data, layout, height, width, id) {
76+
sprintf(
77+
'<div class="%s loading" style="color: rgb(50,50,50);">Drawing...</div><div id="%s" style="height: %s; width: %s;" ></div>\n<script type="text/javascript">Plotly.plot("%s", %s, %s).then(function() {$(".%s.loading").remove();})</script>',
78+
id, id, height, width, id, data, layout, id
79+
)
80+
}
81+
82+
p <- with(fig %>% offline, new_offline(data, layout, height, width, id))
83+
knitr::asis_output(p)
84+
```
85+
86+
```{r}
87+
knitr::asis_output(p)
88+
knitr::asis_output(p)
89+
```
90+
91+
```{r, results="asis"}
92+
print(p, type="HTML")
93+
print(p, type="HTML")
94+
```
95+
96+
```{r, results="asis"}
97+
cat(p)
98+
cat(p)
99+
```
100+
101+
```{r, results="asis"}
102+
for(i in 1:2) {
103+
cat(p)
104+
}
105+
```
106+
107+
108+
```{r, results="asis"}
109+
cat(fig %>% offline)
110+
```
111+
112+
```{r, results="asis"}
113+
cat(knit_print.offline(fig %>% offline))
114+
```
115+
116+
```{r, results="asis"}
117+
for(i in 1:2) {
118+
fig <- list(data=list(list(x=rnorm(100))), layout=list(title=paste(c('plot ', i))))
119+
cat(knit_print.offline(fig %>% offline))
120+
}
121+
```
122+
123+
```{r, results="asis"}
124+
for(i in 1:2) {
125+
print(p, type="HTML")
126+
}
127+
```
128+
129+
```{r}
130+
for(i in 1:2) {
131+
knitr::asis_output(p)
132+
}
133+
```
134+
135+
```{r}
136+
for(i in 1:2) {
137+
print(knitr::asis_output(p))
138+
}
139+
```
140+
141+
142+
```{r, results='asis'}
143+
for(i in 1:2) {
144+
print(knitr::asis_output(p), type='HTML')
145+
}
146+
```

0 commit comments

Comments
 (0)