diff --git a/_posts/r/scientific/2015-07-30-heatmaps.Rmd b/_posts/r/scientific/2015-07-30-heatmaps.Rmd index fd63b366e782..2a48b788cd06 100644 --- a/_posts/r/scientific/2015-07-30-heatmaps.Rmd +++ b/_posts/r/scientific/2015-07-30-heatmaps.Rmd @@ -77,11 +77,11 @@ chart_link The `colors` argument understands color brewer palettes (see `RColorBrewer::brewer.pal.info` for valid names). ```{r, results = 'hide'} -p <- plot_ly(z = volcano, colorscale = "Greys", type = "heatmap") +p <- plot_ly(z = volcano, colors = "Greys", type = "heatmap") # Create a shareable link to your chart # Set up API credentials: https://plot.ly/r/getting-started -chart_link = api_create(p, filename="heatmap-gray") +chart_link = api_create(p, filename="heatmap-grey") chart_link ``` diff --git a/_posts/r/scientific/2015-07-30-heatmaps.md b/_posts/r/scientific/2015-07-30-heatmaps.md index 68640c69658e..c8350e121eda 100644 --- a/_posts/r/scientific/2015-07-30-heatmaps.md +++ b/_posts/r/scientific/2015-07-30-heatmaps.md @@ -34,7 +34,7 @@ packageVersion('plotly') ``` ``` -## [1] '4.5.2' +## [1] '4.8.0' ``` #### Basic Heatmap @@ -50,7 +50,7 @@ chart_link = api_create(p, filename="heatmap-simple") chart_link ``` - + #### Categorical Axes @@ -69,7 +69,7 @@ chart_link = api_create(p, filename="heatmap-cat") chart_link ``` - + #### Sequential Colorscales: Greys @@ -77,15 +77,15 @@ The `colors` argument understands color brewer palettes (see `RColorBrewer::brew ```r -p <- plot_ly(z = volcano, colorscale = "Greys", type = "heatmap") +p <- plot_ly(z = volcano, colors = "Greys", type = "heatmap") # Create a shareable link to your chart # Set up API credentials: https://plot.ly/r/getting-started -chart_link = api_create(p, filename="heatmap-gray") +chart_link = api_create(p, filename="heatmap-grey") chart_link ``` - + #### Custom colorscales @@ -101,7 +101,7 @@ chart_link = api_create(p, filename="heatmap-ramp") chart_link ``` - + Or, you can do the scaling yourself and use the colorscale attribute directly... @@ -119,5 +119,5 @@ chart_link = api_create(p, filename="heatmap-custom") chart_link ``` - +