문제

I'm running R version 3.0.1 and ggplot2 version 0.9.3.1 on a Windows machine and getting aberrant behavior from color bar legends -- the legend labels appear but the color bar mysteriously does not.

For example, if I run the following code:

d <- data.frame(x=rnorm(100), y=rnorm(100), z=rnorm(100))
ggplot(d, aes(x, y, color=z)) + geom_point()

I get this plot: enter image description here

whereas on my other machine (a Mac running R version 2.15.2 and ggplot 0.9.3.1) the same code gives me this: enter image description here

The behavior seems to apply only to color bars for continuous numerical variables -- legends for discrete factors appear as expected. I've tried reinstalling ggplot2. Anybody have thoughts on what's going on here? Thanks!

도움이 되었습니까?

해결책

I found the problem, and a working solution, here. It's an issue with color rendering when accessing a server via Remote Desktop, and can be fixed in host settings.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top