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

Skip to content

Commit 60e212a

Browse files
authored
Merge pull request plotly#1242 from plotly/r-heatmap-doc
Heatmap doc [R] - replaced colorscale attribute with colors
2 parents c504db7 + 0d1f7a5 commit 60e212a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

_posts/r/scientific/2015-07-30-heatmaps.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ chart_link
7777
The `colors` argument understands color brewer palettes (see `RColorBrewer::brewer.pal.info` for valid names).
7878

7979
```{r, results = 'hide'}
80-
p <- plot_ly(z = volcano, colorscale = "Greys", type = "heatmap")
80+
p <- plot_ly(z = volcano, colors = "Greys", type = "heatmap")
8181
8282
# Create a shareable link to your chart
8383
# Set up API credentials: https://plot.ly/r/getting-started
84-
chart_link = api_create(p, filename="heatmap-gray")
84+
chart_link = api_create(p, filename="heatmap-grey")
8585
chart_link
8686
```
8787

_posts/r/scientific/2015-07-30-heatmaps.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ packageVersion('plotly')
3434
```
3535

3636
```
37-
## [1] '4.5.2'
37+
## [1] '4.8.0'
3838
```
3939

4040
#### Basic Heatmap
@@ -50,7 +50,7 @@ chart_link = api_create(p, filename="heatmap-simple")
5050
chart_link
5151
```
5252

53-
<iframe src="https://plot.ly/~RPlotBot/3224.embed" width="800" height="600" id="igraph" scrolling="no" seamless="seamless" frameBorder="0"> </iframe>
53+
<iframe src="https://plot.ly/~RPlotBot/5603.embed" width="800" height="600" id="igraph" scrolling="no" seamless="seamless" frameBorder="0"> </iframe>
5454

5555

5656
#### Categorical Axes
@@ -69,23 +69,23 @@ chart_link = api_create(p, filename="heatmap-cat")
6969
chart_link
7070
```
7171

72-
<iframe src="https://plot.ly/~RPlotBot/3226.embed" width="800" height="600" id="igraph" scrolling="no" seamless="seamless" frameBorder="0"> </iframe>
72+
<iframe src="https://plot.ly/~RPlotBot/5605.embed" width="800" height="600" id="igraph" scrolling="no" seamless="seamless" frameBorder="0"> </iframe>
7373

7474
#### Sequential Colorscales: Greys
7575

7676
The `colors` argument understands color brewer palettes (see `RColorBrewer::brewer.pal.info` for valid names).
7777

7878

7979
```r
80-
p <- plot_ly(z = volcano, colorscale = "Greys", type = "heatmap")
80+
p <- plot_ly(z = volcano, colors = "Greys", type = "heatmap")
8181

8282
# Create a shareable link to your chart
8383
# Set up API credentials: https://plot.ly/r/getting-started
84-
chart_link = api_create(p, filename="heatmap-gray")
84+
chart_link = api_create(p, filename="heatmap-grey")
8585
chart_link
8686
```
8787

88-
<iframe src="https://plot.ly/~RPlotBot/3228.embed" width="800" height="600" id="igraph" scrolling="no" seamless="seamless" frameBorder="0"> </iframe>
88+
<iframe src="https://plot.ly/~RPlotBot/5607.embed" width="800" height="600" id="igraph" scrolling="no" seamless="seamless" frameBorder="0"> </iframe>
8989

9090
#### Custom colorscales
9191

@@ -101,7 +101,7 @@ chart_link = api_create(p, filename="heatmap-ramp")
101101
chart_link
102102
```
103103

104-
<iframe src="https://plot.ly/~RPlotBot/3230.embed" width="800" height="600" id="igraph" scrolling="no" seamless="seamless" frameBorder="0"> </iframe>
104+
<iframe src="https://plot.ly/~RPlotBot/5609.embed" width="800" height="600" id="igraph" scrolling="no" seamless="seamless" frameBorder="0"> </iframe>
105105

106106
Or, you can do the scaling yourself and use the colorscale attribute directly...
107107

@@ -119,5 +119,5 @@ chart_link = api_create(p, filename="heatmap-custom")
119119
chart_link
120120
```
121121

122-
<iframe src="https://plot.ly/~RPlotBot/3232.embed" width="800" height="600" id="igraph" scrolling="no" seamless="seamless" frameBorder="0"> </iframe>
122+
<iframe src="https://plot.ly/~RPlotBot/5611.embed" width="800" height="600" id="igraph" scrolling="no" seamless="seamless" frameBorder="0"> </iframe>
123123

0 commit comments

Comments
 (0)