Zack Weinberg
unread,Nov 17, 2015, 7:37:23 PM11/17/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
I'm playing around, trying to find a good visualization for the
(regrettably large) data frame attached to this message. Two
straightforward renderings are
ggplot(d, aes(x=topic, y=source, fill=category, alpha=score)) +
geom_raster()
ggplot(d, aes(x=topic, y=source, colour=category, size=score)) +
geom_point() + scale_size_area()
These both share the same problem which is that it's hard to see
what's going on at the small end of the scale. So then I tried
ggplot(d, aes(x=topic, y=score, colour=category)) +
facet_grid(source~.) + geom_line() +
scale_y_sqrt(expand=c(0.5,0)) +
theme(
strip.text.y=element_text(angle=0, hjust=0),
strip.background=element_blank(),
panel.margin=unit(1,"mm"),
axis.text.y=element_blank(),
axis.ticks.y=element_blank())
which I rather like, *except* for the positioning of the strip labels:
they are at the far right of the diagram, and they are flush against
the edge of the plot area. Is there any way to get them placed to the
left of the plot area, with a small margin (like that used for tick
labels), instead?
I'll also take suggestions for better visualization options. The
thing I care about most is being able to identify vertical
correlations, i.e. values of "topic" for which several "sources" have
an increased "score", even if the absolute value of that increase is
small.
Note that all of the "source" and "category" labels have been changed.
Thanks,
zw