simple plotting formatting

18 views
Skip to first unread message

Jim Almendinger

unread,
Mar 5, 2012, 9:58:42 PM3/5/12
to Deducer
I'm looking for something to ease the rest of our lab into using R,
and so am exploring Deducer.
(1) for a simple x-y line plot with 2 or 3 y variables: Is there a
point-n-click way of changing line style, thickness, and color? Do I
need to make a separate variable for this? Or do I just need to copy
the script to an editing window and modify the variable via the
command line?
(2) What is the best way of extracting the script that Deducer writes
for making the plots? Use the Tools>View call menu command, and
copy>paste it to the Editor window?
(3) In the Editor, is there a keyboard short cut for Edit>Run all? Or
just Cntr-A + Cntl-R to select all and run selection?

Apologies if these are in the manuals somewhere -- I got stuck on the
line style / color issue and spent hours on the web searching for an
answer. And I've watched several of the You-Tube tutorials as well.
I'm clearly missing a lot of the functionality of the various tools in
the Plot Builder.

Thanks for the help getting me started here.

-- Jim

Tom Hopper

unread,
Mar 6, 2012, 12:53:28 AM3/6/12
to ded...@googlegroups.com
Jim,

(1) Deducer uses ggplot2 for plotting, so for control of colors you want to read up on scale_brewer, scale_gradient, etc. at http://had.co.nz/ggplot2/ or pick up a copy of the ggplot2 book. Generally, yes, you would use some variable to color the data. This may be thought of as a third dimension (which can be either continuous or categorical) to the data, plotted in color instead of on a z-axis.

(2) You can extract the call from "Tools"->"View call" if you want to edit it before running it (and for some operations, like sorting data within the call to ggplot, you may need to do this). You can also get the code from the console window after clicking "Run" in the Plot Builder dialog.

Hope this helps,

Tom
Reply all
Reply to author
Forward
0 new messages