Preparation of Flow Cytometry Figures Using
FlowJo and Canvas (Part 2)
Part 1 (FlowJo) | Part
2 (Canvas) | Part 3 (PowerPoint)
This is a tutorial in three pages. This is page 2, and covers
the use of Canvas to "touch-up" of
a complicated flow cytometry figure generated in FlowJo. The
first page covered advanced uses of the FlowJo layout editor
as the first step in preparing a publication/presentation quality
figure incorporating
a "batch" layout presenting the data from a number of
samples. Page 3 is very short, and covers a few points about doing layouts
in PowerPoint (though why you'd want to do that, I don't know).
Table of Contents
Canvas Versions
The most recently released version of Canvas for the Macintosh is
Canvas 9.0. Readers of this document might also use Canvas 8.x or
Canvas 7.x. Canvas 9.0 introduced a number of user interface changes,
but for all of the techniques described in this tutorial, there is
very littler difference between the versions. This tutorial will
illustrate these techniques using Canvas 9.0.
Important Canvas concepts
There are three important (and non-obvious) concepts in Canvas that
will greatly facilitate the preparation of flow cytometry figures.
These are:
- Setting up the page correctly
- Use of snap-to Guides
- Use of the "Fit to Window" and "Fit to Selection" buttons to
quickly move to the appropriate place in the document for the next
task. The latter button must be added to the toolbar via the "Customize"
command (this tutorial will show you how to do this).
Setting up the page in Canvas
Assuming that you've exported the data from FlowJo by selecting
the "Open with Application" button, Canvas 9 should open automatically
(if you have not selected the application in the FlowJo preferences,
FlowJo will prompt you to do so. Once Canvas 9.0 has opened, perform
the following steps:
- Select the command "Page Setup" from the "File" menu. The dialog
box will look like this:

- Set the page orientation to landscape (the middle of the three
buttons, circled in red above) and the scale to 25%; you can play
around with this number, but this is not a bad starting place for
a large
set
of
plots.
Hit the "OK" button to dismiss the dialog box.
- Select the command "Document Setup..." from the Layout
menu. This dialog box is a bit different between Canvas 9 and versions
7 and 8, but the basic functions are the same. In Canvas 9, it
looks like this:

- In the "Paper Section", select "From Printer" from
the pull-down menu, as shown in the red circle above. Close the
dialog box by clicking on "OK".
- After this operation, the Canvas "drawing area" ought
to be in the landscape orientation. Canvas 9 presents an alternative
to steps 3-4. If you have not selected any objects in Canvas, there
will be a strip across the top of the screen containing a "Paper"
pull-down menu, that you can use to select "From Printer".
Customizing the Canvas Toolbar
Things become significantly easier if you use two toolbar buttons
to control the "zoom level" of the document as you work through the
subsequent steps.
- Select the command "Customize" from the "Canvas" menu. This will
display the following dialog box (without the red circles).

- Select the Category "Menus"
- Select the Sub-Category "Layout"
- Scroll down to find the commands "Views: Fit to Window" and "Views:
Fit to Selection". The dot to the left of the command indicates
whether
it is displayed on the toolbar. The default (I believe) is for
the command "Views: Fit to Window" to be selected. To select the
"Views: Fit to Selection" command, double click on it. This will
add a dot to the left of the command. The icons for both "Fit"
commands are unfortunately identical. You might try your hand at
modifying them by clicking on the "Modify" button, but I have not
done this. When I use the buttons, I often don't remember which
one is where, and so I'll use them on a trial-and-error basis;
since it's so fast, it doesn't really matter if I pick the wrong
one first.
- Close the dialog box by clicking "Close".
- This will leave you a toolbar that looks like this, with the
relevant buttons circled in red:

- Select one of the plots in the document, and play around with
the buttons a bit.
Displaying the Canvas Rulers and adding Guides
- Select the command "Layout -> Views -> Fit to Window" (option-command-R
from the keyboard) if you don't already see the whole document.
- Display the Canvas rulers by selecting the command "Layout
-> Display -> Show Rulers" (or option-shift-command-R
from the keyboard). The rulers are necessary to allow you to add "snap-to" guides
to your document.
- To add a guide to the document, click and hold on one of the
rulers, and drag the mouse to the position in the document where
you'd like to place the guide, which will be displayed in blue.
You can add as many horizontal and vertical guides as you need
(but only add as many as you need!).
- Place one guide to the top of all of the plots, and one guide
just to the right of the leftmost column of plots (it might seem
logical to place it to the left, but the first column of plots
contains tick marks, which make the snap-to operation a bit tricky).
This is displayed in the figure below:

- Make sure that the command "Layout -> Snap To -> Guides" is
toggled with a check mark next to it, as in the figure below.

Moving the Plots Around in Canvas
- When first pasted in , all of the plots are in one object group.
Select the group, and ungroup the plots by selecting the command
"Ungroup" from the "Object" menu (command-U
on the keyboard). Do this only once. If done more than once, the
plots themselves will be ungrouped, and that is neither necessary
nor desireable if you've followed my recommendations on
the previous page.
- Click on some whitespace in the document
to ensure that none of the plots are selected.
- Select the upper leftmost plot of the set and drag it to the
intersection of the two guides that have been placed in the previous
section above,such that the top of the plot snaps to the horizontal
guide, and the right of the plot snaps to the vertical guide. Then
go ahead and drag the second plot in row 1 so that its left edge
snaps to the vertical guide, and the top of the plot snaps to the
horizontal guide. This will give you something that looks like
this:

- The next step is to add a new guide to the right of the R1C2
plot (row 1, column 2). It helps
to zoom in to the R1C2 plot. Click on it and then hit the "Zoom
to Selection" button you added to the tool bar in a previous
step. Drag a new guide from the vertical ruler and drop it exactly
on the right-hand vertical axis of R1C2. Since the zoom on selction places the plot
to fill the window, you might
have
to
scroll slightly
in the vertical or horizontal direction to give yourself enough
room to confidently align the guides.
- Use the "Zoom to Selection" and "Zoom to Window" buttons to move
around the document when you need to. There are other ways to do
this, but I have found that this is by far the most efficient.
Of course, you'll also need to select the relevant plots before
you hit the "Zoom to Selection" button.
- Repeat the process of dragging guides to the right hand axis
of the newly placed plot and dragging over a new plot until all
of the plots are lined up.
- Now add a horizontal guide that exactly matches up with the bottom
of row 1. The screen will look like this at this point:

- Lining up the plots in the second row is much easier, and can
be done without zooming in tightly. Go ahead and to it....
- Now add another horizontal guide at the bottom of the second
row.
- Drag the plots into the proper place for the third row.
- Repeat steps 9 and 10 to place the fourth row. In a total of
a couple of minutes for the whole process, that gets you go this:

Adding Labels for Stimulation Conditions
Before we add the labels for the stimulation conditions, let's clean
things up a bit.
- I find it helpful (but not necessary) to hide the guides at this
point. You could drag them back to thei rulers, one by one, but
you can also select the command "Layout -> Display -> Hide Guides".
This toggles with "Show Guides".
- At this point, be very careful not to move one of the plots without
moving them all. You could group them to prevent this, but I don't
want to do that just yet. Instead, I select all of the plots and
move them so that they are centered on the page.
- While all of the plots are selected, select the command "Object
-> Lock" (command-L).
- Before clicking on the Text Tool, select the font, size,
and style you'd like for your labels. For a figure like the one
we're
working on, I start at Arial, 36 pt, Bold. This is done differently
in Canvas 9 from Canvas 7 and 8, so I'll let you figure this out.
- Type your first label, such as Vehicle Only.
After you've typed it, make sure that it is center-aligned within
its
text box. Again, this is done a little differently in Canvas 9
from versions 7 and 8. In Canvas 9, things will look like this:

- The things to note are circled in red. From left to right, they
are: (1) the Vehicle Only label, which is selected; (2) the font
(Arial); (3) the font size (36); and (4) the center align text
button.
- Add labels for the other columns, as in the figure below. Don't
worry about where they are placed, we'll quickly clean that up
in a minute.

- Open the "Align" palette by selecting the command "Window
->
Palettes -> Align...". Move the palette to a space on the
screen where it is out of the way.
- Drag-select all of the labels, but none of the plots. Your selection
box can overlap the plots in the first row, but must not completely
encompass them.
- Make sure that all of the text boxes use "center-aligned" text
by hitting the "Center Align" button on the toolbar (step 1 in
the figure below).
- Select the
apporpriate alignment buttons in the Align palette—steps
2 and 3 in the figure below. It is necessary to select options
for both
horizontal and vertical alignment. In this case, I've selected
the explicit option which calls for no horizontal alignment (step
3). Finally, hit the "Apply" button, which generates
the alignment seen in the figure.

- Now, we'll horizontally align the individual labels
so that they are centered over the apporpriate plot columns. First,
click
on
the "selection arrow" in the toolbox palette. Next, click
on one of the plots,
and shift-click
on the associated label, so
that
both
are selected. Note that the selection box
for the plot is "grayed
out", since the plot is locked.
- In Canvas 9, there are two ways to align the text box with
the plot. One is on the alignment palette, as in step 10; these
steps are indicated in the red circles in the figure below. The
second is on the "Properties
toolbar", which adapts to the selected items;this option
is indicated in the magenta circle in the figure below. Two
notes: (1) It is necessary only to hit one button on the Properties
toolbar to accomplish the desired alignnment; (2) note that the
alignment option was not available when only text boxes were
selected; instead, the Properties Toolbar displayed items for manipulating
text.

- Repeat the alignment procedure for the other column
labels. If necessary, vertically realign all of the labels with
each other, as in step 10.
Add labels for monkeys
- Before you add labels for the monkeys, you might need to give
yourself some more room on the page. To do this, use the Page Setup
command, and reduce the size of the page by 5% or more.
- The best place for the labels for the monkeys is to the right
of the rows, reserving the lefthand side for the flow axis label,
its customary place. Scroll the Canvas window so that the there
is room on the right hand side to add the labels.
- Individually add the text for the labels for the monkeys. Make
sure that you use center alignment for the text for each of the
labels.
- Center align the labels to each other, using the techniques above.
- Align each label with the appropriate row by selecting a plot
in the row, shift-clicking on the label to select it, and then
applying the alignment as in the section above. Repeat for the
remaining rows.
- If you want, you could make the font size for these labels slightly
larger than the font size for the simulation condition labels,
but don't overdo it. You'll get something that looks like this:

Make room for vertical axis label
If your figure looks like the one above, you'll want to add some
room for the vertical axis label on the left. Here's how we do
it:
- Select everything in the entire document. Unlock the plots with
the command "Object -> Unlock". Be careful not to move one plot
without removing all of them.
- Without deselecting anything, move the objects as a group closer
to the center of the page.
- Relock them, without grouping them.
Adding the remaining labels
We're almost done. We have to add the labels for the flow parameters
on the vertical and horizontal axes. We should also add a label indicating
that the numbers 1-6 indicate separate peptide pools.
- Add a label specifying "IFNg".
Change the font on the last character only to "Symbol".
- Rotate the IFNg label by selecting the command "Effects -> Rotate
Left -> 90°".
- Add a label specifying "CD8"
- Select both the IFNg and CD8 labels, and increase the font size
to 48. In this case, you definitely want the font size for these
elements to be larger than any of the other labels.
- You can drag these labels into the appropriate position, rougly
centered about the middle of all the plots. Alternatively, you
can unlock all of the objects, group all of the plots, relock everything,
and align the labels to the centers of the grouped plots. Many
people will want to add a line with an arrow at the end the length
of all the plots. Personally, I don't think this is necessary,
nor does it add information.
- The label specifying "Gag Peptide Pools" should be
separated from the numbered labels by a line that covers just the
peptide
pools, providing a visual cue that this final label applies to
only a subset of the columns. The result looks like this, the same
as our target on the first page of this tutorial:

Exporting Figures from Canvas
If you plan to place your figure in either a Microsoft Word document
(such as for a grant application) or in PowerPoint or Keynote, you'll
generally get much better results if you export
the file rather than by copying and pasting the graphic. In my hands,
copying and pasting results in an ill-behaved figure that appears
to have significantly degraded resolution, as in the figure below,
taken from a Word document.

You can see that this figure is significantly worse than the figure
above; here's a link to
the Word document containing the direct comparison.
There are a variety of graphic file formats that you can choose
when you export your document from Canvas. I'm not an expert and
don't know if one is better than another, but I have used the following
formats with success: JPG, GIF, PNG,
and TIFF. The following table summarizes these options:
| JPG |
996 kb |
%compression (80%) |
| GIF |
156 kb |
Mode (RGB); width, height, resolution (pixels/inch) |
| PNG |
264 kb |
Similar to GIF |
| TIFF |
748 kb |
Compression (LZW) |
You'll get different file sizes if you choose different options
for the different files. I don't have any basis for choosing one
over the other, although PNG appears to be "lossless" (as might GIF).
Another factor to consider is that there are really only three colors
in the figure above (black, white, and blue).
All of these files are "raster images",
meaning that you cannot ungroup them, but that everything will scale
toegether, including the text.
So, how do we export the figure anyway? Here we go...
- Choose the "File -> Save As..." command.
- Choose the desired format from the dialog box, circled in red
in the figure below.

- Name the file with something sensible in the "Save
As..." field, and hit the Save button.
- To use these files in Word or PowerPoint, choose the command
"Insert -> Picture -> From File", and navigate to the correct file.
In both programs, there is also a "Insert Picture From File" button
on the "Drawing" toolbar.
- To use these files in Keynote, choose the command "Edit
-> Place
-> Choose", navigate to the file of interest, and hit the "Place"
button. This command is in a rather odd
place for a program written by Apple; c'est la vie.
Last up, the PowerPoint alternative....
|