Contour Plots Colored by Channel (formerly "Heat Plots") and Mountain Plots

Note, a heat plot is different than a heatmap

This article overviews contour plots colored by channel (heat plots) and making 3D mountain plots out of heat plots.

Heat plots on Cytobank. A ‘heat plot’ on Cytobank is similar to a density plot or a contour plot and uses the same contouring algorithms to represent three dimensions of information known about each cell. However, instead of displaying the number of cells present in each bin across two chosen x and y channels, a heat plot displays the median fluorescence intensity (MFI) of a z channel in each bin across two chosen x and y channels.

You can make heat plots using Cytobank if you pick "Contour" as the plot type in the illustration page and choose a Color By of "Channel". This will activate the z-axis control as well as the x and y. Then you pick what you want to show on each of the three channels, as usual.

Some of the things that you will want to double check about your heat plots are:
• The percent of cells per contour (Plots: Style => Percent Per Contour) should be ‘2’ %. This will create a much smoother heat plot than the usual settings for contour plots of 5% or 10%. Similarly, outliers should start at 2%.
• The plot background should be black if you are going to make mountain plots later.
• The plot size should be no larger than 128px, and probably 64px. On Cytobank, the more pixels in the plot, the more bins there are in the x and y dimension. This means that if you have only a few cells, you can make your plot smaller to smooth it out. For heat plots, you want to have a lot of cells in each bin or it will not look very nice, so smaller plots tend to work better.

To set up your scales just right so that the plot represents the data well and shows a nice contrast. To edit the scales for a channel on Cytobank, open the wedge next to Plot Scales (above where the illustrations print out). Then you can edit the min, max, and cofactor. It might help to do this while still looking at a standard 2D contour plot of what you want to show on the z-axis first vs. the x-axis and then second vs. the y-axis (so that you can see whether each axis is filling up the plot scale).

Next, completely fill the plot area (on all three axes). You want to have a couple samples representing the full range of your dataset open (e.g. in a signaling experiment, the Unstim and the positive control high level of stim). Next, lower the value for the scale max for each channel until the events at the high end of the scale are just brushing up against the wall of the plot. Then do the same for the min. You want to set them at ~the 2nd percentile and ~the 98th percentile, so a few outliers are on the axis, but not a lot of events (or a contour). For arcsinh scales, make sure the cofactor is appropriate for the zoomed in scales.

Repeat this process of settings in the min, max, and cofactor for any channel you will see in the heat plot.

For signaling channels and markers that change from sample to sample:
1) Things that change a lot across your samples should be shown on the z-axis, not the x or y
2) Phospho-protein signaling should span the scale range well across your samples
3) The events in your Unstim sample should mostly be below the middle of the plot (i.e. below the median, which is what will be plotted in the 3D plot).
4) The events in your interesting stimulated sample should be above the middle of the plot (the median) or at least spread across it, so that there will be some heat signal when you switch to a heat plot.

For lineage and other markers that do not change across the samples that will be displayed:
1) Things that stay the same across your samples should be used as x and y axes
2) The measurement should span the scale range well across your samples.

Once you have set the scales for all the channels, switch the plot type to ‘heat plot’. You should see the Unstim fill the x/y space fairly well and be black to purple. If it's all black with white "holes" (instead of looking like a nice black to yellow density plot), the minimum or cofactor is too high for the z-axis (e.g. phospho) channel. If it's all red/orange/yellow in the Unstim, the min and/or cofactor for the phospho channel are too low (bright red is the median on that color scale, so if the Unstim is red, it means that some of the data are above the median in the Unstim).

It’s easiest to set up the channels using a couple samples you know well, then bring in more data. In part, this is because heat plots can be slow, since they are calculating 2% contours for lots of samples.

You can also use ImageJ to make the 3D mountains from the 2D plots made on Cytobank. For this, you export a "bare" plot from Cytobank (just the plot area, no scales, black background), open it in ImageJ (free from the NIH), and choose Plugins => 3D => Interactive 3D Surface Plot. Then you tweak a few options to fill it in, change the height, and change the lighting.

1) Get ImageJ here:

2) Configure your plot look - for example, you could to change the plot background to black, use the En Fuego colorset, and turn off annotations.

Plots: Style => Plot Background Color => Black
Plots: Scale Display => Show Tickmarks => No
Plots: Scale Display => Show Scale Numbers => No
Plots: Scale Display => Show Axis Labels => No
Plot Size => 128 px

The last is optional and may change how your plots look. By making the plot bigger you spread out the data more (the data are binned less densely at 128 than at 96). Usually you will need to lower the max value of the z-axis channel’s scale if you go to 128 from 96 or it will look too dark, although sometimes switching from Shadow & Flame to En Fuego along with making the plot bigger evens out. If you’re worried about this, just keep a 64px plot.

Make sure you're using the En Fuego colorset (vs. Shadow & Flame) if you have a black background. The main difference is that the outliers are purple instead of black, so they will show up on the black background.

To get a bare plot, right click each heat plot image and open it in a new tab. Copy the URL out and edit it where it says "&annotation=true" to say "&annotation=false". Then paste that back into the Cytobank window. This will turn off everything so that it looks like #2. The white border will mess up ImageJ, which will treat it as a 'white fence' (white being the highest peak value / color value).

3) Save the image somewhere you can find it in the next step.

4) Open ImageJ and select File => Open => the black background bare plot you just saved w/ no annotations.

5) Go to Plugins => 3D => Interactive 3D Surface Plot. This treats your image as a heatmap and uses lighter colors as taller peaks.

6) Configure your settings. For example:

  • Lines: Filled
  • Lighting: 0.4
  • z-ratio: 0.4
  • Uncheck "text" so the numbers go away

7) Take a screenshot and remove the grey background in Photoshop. To do this:

  • Paste the screenshot into Photoshop (w/ the background color you want, usually black or white)
  • Select => Color Range => Use the eyedropper on the grey background to select it
  • Delete
  • Flatten and save as a JPG or copy it into Adobe Illustrator

Have more questions? Submit a request