Preparation of Flow Cytometry Figures Using FlowJo and Canvas (Part 2)

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:

  1. Setting up the page correctly
  2. Use of snap-to Guides
  3. 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:

  1. Select the command "Page Setup" from the "File" menu. The dialog box will look like this:

  1. 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.
  2. 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:

  1. 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".
  2. 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.

  1. Select the command "Customize" from the "Canvas" menu. This will display the following dialog box (without the red circles).

  1. Select the Category "Menus"
  2. Select the Sub-Category "Layout"
  3. 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.
  4. Close the dialog box by clicking "Close".
  5. This will leave you a toolbar that looks like this, with the relevant buttons circled in red:

  1. Select one of the plots in the document, and play around with the buttons a bit.

Displaying the Canvas Rulers and adding Guides

  1. Select the command "Layout -> Views -> Fit to Window" (option-command-R from the keyboard) if you don't already see the whole document.
  2. 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.
  3. 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!).
  4. 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:

  1. 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

  1. 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.
  2. Click on some whitespace in the document to ensure that none of the plots are selected.
  3. 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:

  1. 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.
  2. 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.
  3. 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.
  4. Now add a horizontal guide that exactly matches up with the bottom of row 1. The screen will look like this at this point:

  1. Lining up the plots in the second row is much easier, and can be done without zooming in tightly. Go ahead and to it....
  2. Now add another horizontal guide at the bottom of the second row.
  3. Drag the plots into the proper place for the third row.
  4. 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.

  1. 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".
  2. 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.
  3. While all of the plots are selected, select the command "Object -> Lock" (command-L).
  4. 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.
  5. 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:

  1. 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.
  2. 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.

  1. 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.
  2. 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.
  3. 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).
  4. 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.

 

  1. 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.
  2. 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.

  1. 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

  1. 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.
  2. 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.
  3. 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.
  4. Center align the labels to each other, using the techniques above.
  5. 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.
  6. 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:

  1. 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.
  2. Without deselecting anything, move the objects as a group closer to the center of the page.
  3. 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.

  1. Add a label specifying "IFNg". Change the font on the last character only to "Symbol".
  2. Rotate the IFNg label by selecting the command "Effects -> Rotate Left -> 90°".
  3. Add a label specifying "CD8"
  4. 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.
  5. 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.
  6. 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:

Format File Size 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...

  1. Choose the "File -> Save As..." command.
  2. Choose the desired format from the dialog box, circled in red in the figure below.

  1. Name the file with something sensible in the "Save As..." field, and hit the Save button.
  2. 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.
  3. 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....

 
Site by John Altman

Last Modified: Friday, January 9, 2004