Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 带ggplotly的HTML希腊文字母_R_Ggplot2_Plotly - Fatal编程技术网

R 带ggplotly的HTML希腊文字母

R 带ggplotly的HTML希腊文字母,r,ggplot2,plotly,R,Ggplot2,Plotly,使用ggplotly将ggplot图形转换为plotly图形时,我可以获得一些HTML,例如在标题中: library(plotly) library(ggplot2) library(scales) library(mvtnorm) sims <- rmvnorm(500, mean=c(0,0,0)) dat <- setNames(data.frame(sims), c("x", "y", "z")) dat$z <- dat$x+dat$y gg <- ggp

使用
ggplotly
将ggplot图形转换为plotly图形时,我可以获得一些HTML,例如在标题中:

library(plotly)
library(ggplot2)
library(scales)

library(mvtnorm)
sims <- rmvnorm(500, mean=c(0,0,0))
dat <- setNames(data.frame(sims), c("x", "y", "z"))
dat$z <- dat$x+dat$y

gg <- ggplot(dat, aes(x=x, y=y, colour=z)) + 
  geom_point() + 
  scale_colour_gradient2(limits=c(-2,2), midpoint=0, low=muted("blue"), high=muted("red")) + 
  ggtitle("<em>hello</em>")

ggplotly(gg)
library(plotly)
图书馆(GG2)
图书馆(比例尺)
图书馆(mvtnorm)
sims这适用于:


好!!你回答了你自己的问题。我会删除我的。你可以接受你自己的答案,就像接受别人的答案一样know@useR是的,但是在两天前你不能接受自己的答案。
gg <- ggplot(dat, aes(x=x, y=y, colour=z)) + 
  geom_point() + 
  scale_colour_gradient2(limits=c(-2,2), midpoint=0, low=muted("blue"), high=muted("red")) + 
  ggtitle("&Delta;")

ggplotly(gg)
gg <- ggplot(dat, aes(x=x, y=y, colour=z)) + 
  geom_point() + 
  scale_colour_gradient2(limits=c(-2,2), midpoint=0, low=muted("blue"), high=muted("red")) + 
  ggtitle("&#916;")
ggplotly(gg)
ggtitle("Δ")
ggtitle(intToUtf8(0x0394L))