2
我正在嘗試使用ggplot2創建一個座標圖圖表,但我無法獲得標記,因爲它在ggplot2 webiste的示例中顯示。ggplot2 y軸座標不顯示在對數座標上
這裏是水果的鮮味的一些假數據:
apples <- data.frame(fruit=c(rep("apple", 30)), taste=runif(30, 30, 50)
banana <- data.frame(fruit=c(rep("banana", 30)), taste=runif(30, 300, 500))
orange <- data.frame(fruit=c(rep("orange", 30)), taste=runif(30, 3000, 5000))
fruits <- rbind(apples,banana,orange)
如果我繪製作爲ggplot2 website example y軸的規模應該看起來像:
相反,我得到軸如:
ggplot(fruits, aes(fruit, taste)) + geom_boxplot() + scale_y_log10()
我如何得到科學記數法的y軸比例?
現在似乎不適合我。如果有一段時間,我將不得不周遊世界。最重要的部分不是科學記數法,而是y軸上0到1000之間缺失的巨大差距。當我更新我的操作系統時,我必須錯誤地更新到0.8.9。 – Kevin 2012-03-11 04:08:36
得到它的工作,需要附加秤包。 – Kevin 2012-03-11 04:12:45
@Kev很高興幫助。當尺度需要明確加載並且還沒有時,我還沒有完全包裹我的頭。 – joran 2012-03-11 04:41:28