making own geom

9 views
Skip to first unread message

Julius Tesoro

unread,
Mar 8, 2010, 1:02:32 PM3/8/10
to ggp...@googlegroups.com
Hi Hadley, ggplot2 users and addicts,

I am a big fan of ggplot2 but sometimes I want to plot 'special graphs that are not supported. Supposing that I want to build my own geom, how do I do that? and where do I start?

Cheers,

Julius



 

hadley wickham

unread,
Mar 10, 2010, 9:19:58 AM3/10/10
to Julius Tesoro, ggp...@googlegroups.com
Hi Julius,

Two suggestions:

1) Read the attached draft of a chapter on writing your own objects
that never made it into the book. It's very very rough, but will
hopefully give you some pointers.

2) Read the source code for some of the simpler geoms like
geom_point, geom_rect and geom_text. Then have a look at more
complicated ones like geom_line and geom_boxplot. When you're starting
off, you can ignore all the coordinate transformation stuff - that
only matters if you want your geom to work in non-Cartesian coordinate
systems.

Hadley

> --
> You received this message because you are subscribed to the ggplot2 mailing
> list.
> To post to this group, send email to ggp...@googlegroups.com
> To unsubscribe from this group, send email to
> ggplot2+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/ggplot2

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

writing-your-own.pdf
Reply all
Reply to author
Forward
0 new messages