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.

Thanks in advance,

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))

fig.subplots_adjust(wspace=0)

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:
Gallery Link:

http://matplotlib.org/gallery.html

Direct Link:
http://matplotlib.org/examples/lines_bars_and_markers/fill_demo_features.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.

Thanks in advance,


C. Balasubramanian

Bala


Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server

from Actuate! Instantly Supercharge Your Business Reports and Dashboards

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

Get technology previously reserved for billion-dollar corporations, FREE

http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk


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.

Structural basis for ion permeation mechanism in pentameric ligand-gated ion channels - PubMed

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:

Thanks in advance,
Bala

--
C. Balasubramanian