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("Δ")
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("Δ")
ggplotly(gg)
ggtitle("Δ")
ggtitle(intToUtf8(0x0394L))