Vlines across multiple subplots

I have several heatmap images, which I place in subplots stacked vertically. I’ve been using

ax = figure.add_subplot(nplots, 1, plotnum)

ax.imshow(…)

to add each subsequent heatmap, and then place

Sorry about that; don’t know what key combo I pushed. Completed email is below.

···

On Thu, Oct 7, 2010 at 3:09 PM, Justin McCann <jneilm@…287…> wrote:

I have several heatmap images, which I place in subplots stacked vertically. I’ve been using
ax = figure.add_subplot(nplots, 1, plotnum)

ax.imshow(…)

to add each subsequent heatmap, and then place a colorbar as another subplot. I’d like to annotate across all of the subplots by placing a vertical line (or vspan) across the entire figure-- to extend from the bottom figure all the way to the top, including the spaces in between. I thought I had seen an example of this somewhere, but couldn’t find it in the gallery. Any suggestions?

Thanks,

Justin

You are right, I could have sworn I seen an example of that somewhere, but this is the best I could find:

http://matplotlib.sourceforge.net/users/annotations_guide.html?highlight=annotation#using-connectorpatch

Maybe someone else knows of the “correct” way of doing this and we could get it added to the gallery?

Ben Root

···

On Thu, Oct 7, 2010 at 2:16 PM, Justin McCann <jneilm@…2015…87…> wrote:

Sorry about that; don’t know what key combo I pushed. Completed email is below.

On Thu, Oct 7, 2010 at 3:09 PM, Justin McCann <jneilm@…287…> wrote:

I have several heatmap images, which I place in subplots stacked vertically. I’ve been using
ax = figure.add_subplot(nplots, 1, plotnum)

ax.imshow(…)

to add each subsequent heatmap, and then place a colorbar as another subplot. I’d like to annotate across all of the subplots by placing a vertical line (or vspan) across the entire figure-- to extend from the bottom figure all the way to the top, including the spaces in between. I thought I had seen an example of this somewhere, but couldn’t find it in the gallery. Any suggestions?

Thanks,

Justin

That works; thanks for the pointer.

···

On Thu, Oct 7, 2010 at 4:08 PM, Benjamin Root <ben.root@…3176…> wrote:


On Thu, Oct 7, 2010 at 3:09 PM, Justin McCann <jneilm@…287…> wrote:

I’d like to annotate across all of the subplots by placing a vertical line (or vspan) across the entire figure-- to extend from the bottom figure all the way to the top, including the spaces in between. I thought I had seen an example of this somewhere, but couldn’t find it in the gallery. Any suggestions?

You are right, I could have sworn I seen an example of that somewhere, but this is the best I could find:

http://matplotlib.sourceforge.net/users/annotations_guide.html?highlight=annotation#using-connectorpatch