我已經在ggplot2中生成了一個事實圖,並且x軸標籤(底部)稍微觸摸了縮放值(當我繪製到.pdf設備時它會變差)。如何將軸標籤向下移動?移動軸標籤ggplot
DF<-structure(list(race = structure(c(3L, 1L, 3L, 2L, 3L, 1L, 2L,
2L, 2L, 3L, 2L, 1L, 3L, 3L, 3L, 3L, 2L, 1L, 2L, 3L), .Label = c("asian",
"black", "white"), class = "factor"), gender = structure(c(1L,
1L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 1L, 1L,
2L, 2L, 2L), .Label = c("female", "male"), class = "factor"),
score = c(0.0360497844302483, 0.149771418578119, 0.703017688328021,
1.32540102136392, 0.627084455719946, -0.320051801571444,
0.852281028633536, -0.440056896755573, 0.621765489966213,
0.58981396944136, 1.95257757882381, 0.127301498272644, -0.0906338578670778,
-0.637727808028146, -0.449607617033673, 1.03162398117388,
0.334259623567608, 0.0912327543652576, -0.0789977852804991,
0.511696466039959), time1 = c(75.9849658266583, 38.7148843859919,
54.3512613852158, 37.3210772390582, 83.8061071736856, 14.3853324033061,
79.2285735003004, 31.1324602891428, 22.2294730114138, 26.427263191766,
40.5529893144888, 19.2463281412667, 8.45085646487301, 97.6770352620696,
61.1874163107771, 31.3727683430548, 99.4155144857594, 79.0996849438957,
21.2504885323517, 94.1079332400361)), .Names = c("race",
"gender", "score", "time1"), class = "data.frame", row.names = c(NA,
-20L))
require(ggplot2)
p <- ggplot(DF, aes(score, time1, group=gender))
p + geom_point(aes(shape=19)) + facet_grid(race~gender) + scale_x_continuous('BLAH BLAH') +
scale_y_continuous('Some MOre Of theat Good Blahing')
在我的數據BLAH BLAH正在觸摸數字。我需要它下移。怎麼樣?
嗯。你可以擴展一下它的外觀或者發佈一個示例圖片,當我運行它時看起來很好。可能是特定於平臺/設備/圖像大小。 – joran
@joran我無法發佈圖片或數據,因爲我在使用別人的數據。儘管如此,我仍然無法將問題複製到此數據集之外,所以我盡我所能。 –
沒問題...我看到你有指示調整理由。我只是好奇,因爲我無法複製它。 – joran