[R] ggplot equivalent of par(xaxt)

John Kane jrkrideau at yahoo.ca
Tue Oct 6 20:50:59 CEST 2009


I am playing around learning ggplot and cannot see how to suppress the x or y axis values ( equivalent of xaxt in basic graphics)

It must be obvious but I'm not seeing it.  

Problem
=================================================================
timedata <- structure(list(month = structure(c(5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L), .Label = c("Apr", "Aug", "Dec", "Feb", "Jan",
"Jul", "Jun", "Mar", "May", "Nov", "Oct", "Sep"), class = "factor"),
    days = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L,
    13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L,
    25L, 26L, 27L, 28L, 29L, 30L, 1L, 2L, 3L, 4L, 5L, 6L, 7L,
    8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L,
    20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L), temps = c(39.2896128958748,
    24.0463892588954, 14.7144317681674, 26.4473300457299, 17.5444095397464,
    17.0554503502032, 31.4467837626264, 26.8669765071813, 31.6581966018795,
    33.6092903491756, 31.0445298273758, 40.3509587680154, 19.4642817074759,
    25.4368212783209, 32.4769837888977, 20.0778425836075, 20.7275666901593,
    7.67556461182032, 20.710769686952, 21.5516612954105, 26.7415743698656,
    18.9571423249225, 29.4591207748791, 28.5211729296181, 17.4525627959805,
    30.923234208759, 20.6069761349652, 32.5113389689697, 30.5485452291517,
    36.108280749871, 33.1800210253601, 32.9708790994613, 36.6536488173013,
    21.5872681514094, 17.3698466624875, 23.8735008677194, 21.7834805625618,
    39.7441872059634, 19.2363318860703, 17.2332575158032, 16.5456489770264,
    27.4925071988056, 15.416376720661, 47.0542371710754, 28.9163963545337,
    16.5216554897757, 29.6730172832844, 24.2525944040588, 13.2414079242807,
    15.9791856515821, 19.4387549406012, 33.9589173474519, 19.5190927150932,
    26.3488819156667, 28.7998700507852, 23.9846608380048, 7.88582132117484,
    18.6611269160678, 28.9459512288244, 29.7954832888135), duration = 1:60), .Names = c("month",
"days", "temps", "duration"), row.names = c(NA, 60L), class = "data.frame")

p  <- ggplot(timedata, aes(duration, temps, colour=month)) + geom_line() +
  opts(legend.position = "none", title="Yearly temperatures")  

====================================================================

How do I suppress the numbers on the x-axis?

Thanks


      __________________________________________________________________
[[elided Yahoo spam]]




More information about the R-help mailing list