How to remove axis labels

Showing 1-5 of 5 messages
How to remove axis labels Bogaso 6/13/10 2:48 AM
Dear all,

Please consider following plot :

library(ggplot2)
m <- qplot(rating, votes, data=subset(movies, votes > 1000), na.rm =
T)
m + scale_y_continuous("number of votes")

Here I want to remove the numbers : 2,3,4,5,........ etc along the x-
axis as well as 50000, 100000, 150000 along the y-axis. I want nothing
to be displayed there. Is it possible to achieve this using ggplot
techniques?

Thanks for your attention.
Re: How to remove axis labels Dennis Murphy 6/13/10 4:06 AM
m <- qplot(rating, votes, data=subset(movies, votes > 1000), na.rm = T)
m + scale_y_continuous("number of votes")
last_plot() + opts(axis.text.x = theme_blank(),
                    axis.text.y = theme_blank())

HTH,
Dennis


--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442

To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

Re: How to remove axis labels Bogaso 6/13/10 6:04 AM
Thanks Dennis for your reply. It is working. However still I need one
more modification. You see still "tick-marks" are left in black colors
at the places of those numbers. I would like to clean those as well,
without effecting the "tick-lines" within the plot region, which are
in white color. Can I do that?

Thanks,

On Jun 13, 4:06 pm, Dennis Murphy <djmu...@gmail.com> wrote:
> m <- qplot(rating, votes, data=subset(movies, votes > 1000), na.rm = T)
> m + scale_y_continuous("number of votes")
> last_plot() + opts(axis.text.x = theme_blank(),
>                     axis.text.y = theme_blank())
>
> HTH,
> Dennis
>
>
>
> On Sun, Jun 13, 2010 at 2:48 AM, Bogaso <bogaso.christo...@gmail.com> wrote:
> > Dear all,
>
> > Please consider following plot :
>
> > library(ggplot2)
> > m <- qplot(rating, votes, data=subset(movies, votes > 1000), na.rm =
> > T)
> > m + scale_y_continuous("number of votes")
>
> > Here I want to remove the numbers : 2,3,4,5,........ etc along the x-
> > axis as well as 50000, 100000, 150000 along the y-axis. I want nothing
> > to be displayed there. Is it possible to achieve this using ggplot
> > techniques?
>
> > Thanks for your attention.
>
> > --
> > You received this message because you are subscribed to the ggplot2 mailing
> > list.
> > Please provide a reproducible example:http://gist.github.com/270442
>
> > To post: email ggp...@googlegroups.com
> > To unsubscribe: email ggplot2+u...@googlegroups.com<ggplot2%2Bunsubscribe@googlegroups.com >
> > More options:http://groups.google.com/group/ggplot2
Re: How to remove axis labels ahmadou dicko 6/13/10 3:24 AM
Hi List,
This is my first post, and i'm new to R and ggplot. first of all, i really want to thanks Dr Wickham for the software he did !!! Is my favorite package.
To answer to your questions Mr bogaso, i think that you have to add this :


m <- qplot(rating, votes, data=subset(movies, votes > 1000), na.rm =
T) + scale_y_continuous("number of votes")

 m + opts(axis.text.x = theme_blank(),axis.text.y=theme_blank())

ps: sorry for my english too......have a nice day
2010/6/13 Bogaso <bogaso.c...@gmail.com>

--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442

To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

Re: How to remove axis labels Dennis Murphy 6/13/10 5:20 PM
Hi:

m + scale_y_continuous("number of votes") +
    opts(axis.text.x = theme_blank(), axis.text.y = theme_blank(),
            axis.ticks = theme_blank())

See section 8.1 of the ggplot2 book for references and examples.

HTH,
Dennis