# multiple plots on single axis

Friends,

I want to make multiple graphs on a single axes. As an example, i am pasting below an article where it has been shown.

http://www.ncbi.nlm.nih.gov/pubmed/23403925

My plot of interest is Figure7B, where multiple distribution are depicted in single plot. I want to make a similar one. Kindly give me some insights on how i can make it with mpl, if anyone have achieved making it with mpl.

Bala

···

C. Balasubramanian

you could go with something like this:

import matplotlib.pyplot as plt

import numpy as np

fig, ax = plt.subplots(1, 10, figsize=(10,3))

for i,axi in enumerate(ax):

``````axi.axis((0,1,0,1))

axi.xaxis.set_ticks([])

axi.yaxis.set_ticks([])

if i is 0:

axi.xaxis.tick_bottom()

axi.yaxis.tick_left()

axi.spines['right'].set_visible(False)

axi.spines['top'].set_visible(False)

axi.spines['left'].set_bounds(0, 1)

axi.spines['bottom'].set_bounds(0, 1)

axi.yaxis.set_ticks(np.linspace(0,1,5))

axi.yaxis.set_ticklabels(np.linspace(0,1,5))

axi.xaxis.set_ticks(np.linspace(0,1,3))

axi.xaxis.set_ticklabels(np.linspace(0,1,3))

if i > 0:

axi.set_frame_on(False)

axi.plot(np.random.rand(10), np.random.rand(10))
``````
···

C. Balasubramanian

Check out the third example in the gallery:

http://matplotlib.org/gallery.html

···

On Thu, Nov 27, 2014 at 6:55 AM, Bala subramanian <bala.biophysics@…287…> wrote:

Friends,

I want to make multiple graphs on a single axes. As an example, i am pasting below an article where it has been shown.

http://www.ncbi.nlm.nih.gov/pubmed/23403925

My plot of interest is Figure7B, where multiple distribution are depicted in single plot. I want to make a similar one. Kindly give me some insights on how i can make it with mpl, if anyone have achieved making it with mpl.

C. Balasubramanian

Bala

with Interactivity, Sharing, Native Excel Exports, App Integration & more

Get technology previously reserved for billion-dollar corporations, FREE

Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Friends,

I want to make multiple graphs on a single axes. As an example, i am
pasting below an article where it has been shown.

http://www.ncbi.nlm.nih.gov/pubmed/23403925

My plot of interest is *Figure7B*, where multiple distribution are
depicted in single plot. I want to make a similar one. Kindly give me
some insights on how i can make it with mpl, if anyone have achieved
making it with mpl.

Fig 7b is just a set of curves with sequential offsets in x, right? A LineCollection can be nice for this. See the last panel in http://matplotlib.org/examples/api/collections_demo.html.

Eric

···

On 2014/11/27, 4:55 AM, Bala subramanian wrote: