Skip to content

Commit 3e32b05

Browse files
authored
Minor image fix (plotly#71)
* Update 2021-08-03-horizontal-vertical-shapes.Rmd * Removing Python reference
1 parent e383137 commit 3e32b05

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

r/2020-02-25-images.Rmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: How to display image data in Python with R.
2+
description: How to display image data with R.
33
display_as: scientific
44
language: r
55
layout: base
@@ -40,7 +40,7 @@ library(EBImage)
4040
4141
img = readImage('https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Crab_Nebula.jpg/240px-Crab_Nebula.jpg')
4242
43-
fig <- plot_ly(type="image", z=img*255)
43+
fig <- plot_ly(type="image", z=img*255)
4444
fig
4545
```
4646
### Define the data range covered by the color range with zmin and zmax
@@ -54,11 +54,11 @@ library(EBImage)
5454
5555
img = readImage('https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Crab_Nebula.jpg/240px-Crab_Nebula.jpg')
5656
# 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,
5858
zmin=c(10, 0, 0), zmax=c(200, 250, 250))
5959
fig
6060
```
61-
### Set Ticks and Margins
61+
### Set Ticks and Margins
6262

6363
```{r}
6464
library(plotly)
@@ -74,11 +74,11 @@ fig
7474

7575
### Drawing Shapes on Images
7676

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.
7878

7979
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.
8080

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/).
8282

8383
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
8484

@@ -98,7 +98,7 @@ library(EBImage)
9898
9999
img = readImage('https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Crab_Nebula.jpg/240px-Crab_Nebula.jpg')
100100
101-
fig <- plot_ly(type="image", z=img*255)
101+
fig <- plot_ly(type="image", z=img*255)
102102
103103
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'))
104104
@@ -110,4 +110,4 @@ fig
110110
```
111111

112112
### 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!

r/2021-07-27-ml-pca.Rmd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ thumbnail: thumbnail/ml-pca.png
1515
```{r, echo = FALSE, message=FALSE}
1616
knitr::opts_chunk$set(message = FALSE, warning = FALSE)
1717
```
18-
## PCA Visualization in Python
1918
Visualize Principle Component Analysis (PCA) of your high-dimensional data in R with Plotly.
2019

2120
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.

r/2021-08-03-horizontal-vertical-shapes.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ output:
99
html_document:
1010
keep_md: true
1111
permalink: r/horizontal-vertical-shapes/
12-
thumbnail: thumbnail/shape.png
12+
thumbnail: thumbnail/shape.jpg
1313
---
1414

1515
```{r, echo = FALSE, message=FALSE}

0 commit comments

Comments
 (0)