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

Skip to content

Commit 92fdd5d

Browse files
committed
fixed tooltip
1 parent 6fd0fcf commit 92fdd5d

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

_posts/ggplot2/2019-08-06-geom_jitter.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ p <- ggplot(district_density,aes(x=cluster, y=dem_margin, colour=region)) +
5555
labs(title = "Democratic performance in the 2018 House elections, by region and density",
5656
x = "Density Index from CityLab",
5757
y = "Democratic Margin of Victory/Defeat")
58-
ggplotly(p)
58+
p <- ggplotly(p)
5959
6060
# Create a shareable link to your chart
6161
# Set up API credentials: https://plot.ly/r/getting-started
@@ -80,7 +80,7 @@ p <- ggplot(district_density,aes(x=cluster, y=dem_margin)) +
8080
labs(title = "Democratic performance in the 2018 House elections, by region and density",
8181
x = "Density Index from CityLab",
8282
y = "Democratic Margin of Victory/Defeat")
83-
ggplotly(p)
83+
p <- ggplotly(p)
8484
8585
# Create a shareable link to your chart
8686
# Set up API credentials: https://plot.ly/r/getting-started
@@ -105,7 +105,7 @@ p <- ggplot(district_density,aes(x=region, y=dem_margin, colour=region)) +
105105
labs(title = "Democratic performance in the 2018 House elections, by region and density",
106106
x = "Density Index from CityLab",
107107
y = "Democratic Margin of Victory/Defeat")
108-
ggplotly(p)
108+
p <- ggplotly(p)
109109
110110
# Create a shareable link to your chart
111111
# Set up API credentials: https://plot.ly/r/getting-started
@@ -138,7 +138,7 @@ p <- ggplot(district_density,aes(x=region, y=dem_margin, colour=region)) +
138138
labs(title = "Democratic performance in the 2018 House elections, by region and density",
139139
x = "Density Index from CityLab",
140140
y = "Democratic Margin of Victory/Defeat")
141-
ggplotly(p)
141+
p <- ggplotly(p)
142142
143143
# Create a shareable link to your chart
144144
# Set up API credentials: https://plot.ly/r/getting-started
@@ -170,7 +170,7 @@ p <- ggplot(district_density,aes(x=region, y=dem_margin, colour=region)) +
170170
y = "Democratic Margin of Victory/Defeat") +
171171
theme(text = element_text(family = 'Fira Sans'),
172172
legend.position = "none")
173-
ggplotly(p)
173+
p <- ggplotly(p)
174174
175175
# Create a shareable link to your chart
176176
# Set up API credentials: https://plot.ly/r/getting-started
@@ -200,7 +200,7 @@ p <- ggplot(district_density,aes(x=cluster, y=dem_margin, colour=region,
200200
x = "Density Index from CityLab",
201201
y = "Democratic Margin of Victory/Defeat") +
202202
theme(text = element_text(family = 'Fira Sans'))
203-
ggplotly(p, tooltip=c("district","y"))
203+
p <- ggplotly(p, tooltip=c("district","y"))
204204
205205
# Create a shareable link to your chart
206206
# Set up API credentials: https://plot.ly/r/getting-started

_posts/ggplot2/2019-08-06-geom_jitter.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ p <- ggplot(district_density,aes(x=cluster, y=dem_margin, colour=region)) +
5757
labs(title = "Democratic performance in the 2018 House elections, by region and density",
5858
x = "Density Index from CityLab",
5959
y = "Democratic Margin of Victory/Defeat")
60-
ggplotly(p)
60+
p <- ggplotly(p)
6161

6262
# Create a shareable link to your chart
6363
# Set up API credentials: https://plot.ly/r/getting-started
@@ -81,7 +81,7 @@ p <- ggplot(district_density,aes(x=cluster, y=dem_margin)) +
8181
labs(title = "Democratic performance in the 2018 House elections, by region and density",
8282
x = "Density Index from CityLab",
8383
y = "Democratic Margin of Victory/Defeat")
84-
ggplotly(p)
84+
p <- ggplotly(p)
8585

8686
# Create a shareable link to your chart
8787
# Set up API credentials: https://plot.ly/r/getting-started
@@ -105,7 +105,7 @@ p <- ggplot(district_density,aes(x=region, y=dem_margin, colour=region)) +
105105
labs(title = "Democratic performance in the 2018 House elections, by region and density",
106106
x = "Density Index from CityLab",
107107
y = "Democratic Margin of Victory/Defeat")
108-
ggplotly(p)
108+
p <- ggplotly(p)
109109

110110
# Create a shareable link to your chart
111111
# Set up API credentials: https://plot.ly/r/getting-started
@@ -137,7 +137,7 @@ p <- ggplot(district_density,aes(x=region, y=dem_margin, colour=region)) +
137137
labs(title = "Democratic performance in the 2018 House elections, by region and density",
138138
x = "Density Index from CityLab",
139139
y = "Democratic Margin of Victory/Defeat")
140-
ggplotly(p)
140+
p <- ggplotly(p)
141141

142142
# Create a shareable link to your chart
143143
# Set up API credentials: https://plot.ly/r/getting-started
@@ -168,7 +168,7 @@ p <- ggplot(district_density,aes(x=region, y=dem_margin, colour=region)) +
168168
y = "Democratic Margin of Victory/Defeat") +
169169
theme(text = element_text(family = 'Fira Sans'),
170170
legend.position = "none")
171-
ggplotly(p)
171+
p <- ggplotly(p)
172172

173173
# Create a shareable link to your chart
174174
# Set up API credentials: https://plot.ly/r/getting-started
@@ -197,7 +197,7 @@ p <- ggplot(district_density,aes(x=cluster, y=dem_margin, colour=region,
197197
x = "Density Index from CityLab",
198198
y = "Democratic Margin of Victory/Defeat") +
199199
theme(text = element_text(family = 'Fira Sans'))
200-
ggplotly(p, tooltip=c("district","y"))
200+
p <- ggplotly(p, tooltip=c("district","y"))
201201

202202
# Create a shareable link to your chart
203203
# Set up API credentials: https://plot.ly/r/getting-started

0 commit comments

Comments
 (0)