reduce space between axis titles and axis

109 views
Skip to first unread message

Sebastian Weber

unread,
Aug 2, 2010, 9:10:29 AM8/2/10
to ggplot2
Hi!

I am puzzled on how to reduce the spacing between the axis title and the axis itself. Can I set this distance manually or somehow force it to shrink? Thanks a lot

Sebastian

Hadley Wickham

unread,
Aug 2, 2010, 5:22:33 PM8/2/10
to Sebastian Weber, ggplot2
Hi Sebastian,

Do you have a reproducible example?

Hadley

> --
> 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
>

--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

Sebastian Weber

unread,
Aug 3, 2010, 5:45:23 AM8/3/10
to Hadley Wickham, ggplot2
Hi Hadley,

here is an example:


library(ggplot2)

theme_bw(10)

cp <- qplot(uempmed, unemploy, data = economics, geom="path", log="y")
bp <- qplot(uempmed, unemploy, data = economics, log="xy") +
  geom_smooth(se = F)

pdf("polishing-subplot-bw.pdf", width = 4, height = 4)
subvp <- viewport(width = 0.4, height = 0.4, x = 0.75, y = 0.35)
bp
print(cp, vp = subvp)
dev.off()

The problem is even more severe for the inset plot for some reason.

Greetings,

Sebastian

Hadley Wickham

unread,
Aug 9, 2010, 11:08:15 PM8/9/10
to Sebastian Weber, ggplot2
I've attached the plot that I get - to my eye it looks like you have
too little space between the axis and its title, not too much!

Hadley

On Tue, Aug 3, 2010 at 4:45 AM, Sebastian Weber

polishing-subplot-bw.pdf
Reply all
Reply to author
Forward
0 new messages