--
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
Best,
Ista
--
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org
> Using scale_grey() unfortunately doesn't scale. For example try
> matching a bar to an item with ten levels of grey.
While 10 sounds like a lot, have you looked at colorbrewer and its
printer-safe color schemes?
Bill
--
Bill Harris http://makingsense.facilitatedsystems.com/
Facilitated Systems Everett, WA 98208 USA
http://www.facilitatedsystems.com/ phone: +1 425 374-1845
It seems to me that the issue isn't really with ggplot2 but rather at
a much lower level, with grid, or even its interaction with R graphic
devices. Thus, it would make more sense to discuss it on R-help or
R-devel. It might be possible to tweak grid a little and simply use
already-existing patterns on devices that support them natively
(Cairo, tikzDevice, SVG perhaps).
baptiste
For statistical graphics, I think we also need a good way of
specifying a useful set of patterns with good perceptual properties.
I would think the place to start would be with sets of lines at
various angles and spacings, but I'm not aware of any work in this
area.
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
I understand this will seem like an impractical solution too but at
least it is an easy enough workaround:
- use a colour scale
- export the plot to PDF or SVG
- open and modify it in Inkscape
- export PDF or EPS or whatever the publisher wants (they will
probably stupidly ask for 600dpi TIFFs) from Inkscape
Inkscape comes with functionality that will make the modifications easy"ish".
Selecting elements of the same colour
- select one element of a given colour
- right click on the colour swatch at the bottom left of the window
- select "Copy colour"
- Edit > Find (Ctrl+F)
- in the "Style" section, paste the colour (Ctrl+V)
- click "Find" or press "Enter"
This will select all elements with this colour in the plot. You can
edit them all at once (change their colour, fill them with a pattern,
etc.). To "save" this selection, just group the elements (Edit >
Group, Ctrl+G). You can later select the group and apply a certain
style to it.
Applying and modifying a pattern
- select an element
- in the fill and stroke panel, select a pattern
- select the node tool (second from top)
- handles appear at the top left of the page, they modify the pattern
- the square handle modify the size of the pattern, the round one
modifies the rotation
Applying the same style to several elements
- select the element with the style you want
- Edit > Copy (Ctrl+C)
- select all other elements you want the style applied to
- Edit > Paste style (Ctrl+Shift+V)
You can select one element inside a group by Ctrl+clicking on it,
modify it, copy it, then click elsewhere to clear the selection, click
on the group and paste style. The whole group will get the new style
you just defined.
Creating a pattern
- draw something on the canvas
- when this something has several elements, group them
- select the just created object/group and Object > Pattern > Object
to pattern (Alt+I)
- select an object you want to apply the pattern to
- in the Fill and Stroke dialog, select the new pattern in the pattern
list. It should be named something like "pattern12345"
The pattern will be repeated based on the bounding box of the original
object. So, as a rule of thumb, when designing a pattern, try to have
it fit in a rectangle. You will be able to modify its size and
orientation with the node tool after the pattern is applied anyway.
This might all seem complex but really, once you get the hang of how
Inkscape works, handles objects etc. it is very easy and quite fast.
Inkscape is remarkably consistent so, even if it is a powerful piece
of software, it should be easy to learn.
Reproducible research principles say you shouldn't do this. Practical
requirements show that, for me at least, it is much faster to get
decent enough plots from ggplot, choose among them and then polish the
few that will make it in the paper in Inkscape, even if I have to redo
the polishing once or twice because I redid the plot. There are things
like changing fonts, highlighting a part of a plot, rearranging the
legend, modify the spacing between plot elements that are only
reasonably done in an external software.
That's my two cents.
JiHO
---
http://maururu.net