innie vs outie

9 views
Skip to first unread message

westie314

unread,
Mar 12, 2009, 10:24:14 AM3/12/09
to ggplot2
Greetings,

A quick question about altering the tick marks... my organization
specifies that tick marks must face inward.
In R traditional graphics syntax, I specify "tcl=0.3" (usually from
within a call to "axis") to alter the tick length and orientation.

Does anyone know of a similar mechanism in ggplot2?

Thanks!

- Steve

hadley wickham

unread,
Mar 14, 2009, 11:55:11 AM3/14/09
to westie314, ggplot2
Hi Steve,

I'm a pretty strong believer that tick marks should go outside the
plot - otherwise it's very easy for them to overlap with data elements
- and so there's no way to put them on the inside for ggplot2 (it also
seems a little redundant given that there are already grid lines on
the plot). However, you can work around the lack by using geom_rug.

Hadley
--
http://had.co.nz/

jiho

unread,
Mar 14, 2009, 12:28:26 PM3/14/09
to ggplot2

On 2009-March-14 , at 11:55 , hadley wickham wrote:
> On Thu, Mar 12, 2009 at 9:24 AM, westie314 <smwe...@usgs.gov> wrote:
>> A quick question about altering the tick marks... my organization
>> specifies that tick marks must face inward.
>> In R traditional graphics syntax, I specify "tcl=0.3" (usually from
>> within a call to "axis") to alter the tick length and orientation.
>>
>> Does anyone know of a similar mechanism in ggplot2?
>
> I'm a pretty strong believer that tick marks should go outside the
> plot - otherwise it's very easy for them to overlap with data elements
> - and so there's no way to put them on the inside for ggplot2 (it also
> seems a little redundant given that there are already grid lines on
> the plot). However, you can work around the lack by using geom_rug.

My guess is that you only show a few plots to your "organisation"
among all those you produce. One solution would then be to fix the
issue manually: open up the plot in a vector graphics editor
(Inkscape, Adobe Illustrator) and just move the tick marks inside. I
should take you a minute per plot at most and the development version
of Inkscape deals with PDFs or SVGs produced by R very well.
I know there are strong opinions about that and some people firmly
believe that touching the plot after it is produced is against the
principle of reproducible research. I personally think that, when it
is for some cosmetic fixes such as this one, that, in addition, might
be "wrong" hence not encouraged by the plotting package (cf Hadley
argument above), this is perfectly acceptable. Now, you'll have to
make your own opinion.

JiHO
---
http://jo.irisson.free.fr/


Reply all
Reply to author
Forward
0 new messages