Matplotlib/Seaborn double scatter plot with three side histograms (extending JointGrid) -


i have 3 datasets (data1, data2, data3), , i'd create rather complicated plot: stacked scatter plot (two scatter plots on top of each other) 3 histograms on sides.

this have far 1 set, , below can see resulting plot:

from numpy.random import randn import matplotlib mpl import matplotlib.pyplot plt import seaborn sns  data1 = randn(500) data2 = randn(500) * 20 data3 = randn(500) + 5  e1c = sns.color_palette()[0] e2c = sns.color_palette()[1] e3c = sns.color_palette()[2]  sns.axes_style("white"):     g = sns.jointgrid(data2, data3)     g.plot_marginals(sns.distplot, kde=false, color=e3c)     g.plot_joint(plt.scatter, color=e3c, alpha=.2)      plt.show() 

resulting plot

and same 1 annotations need produce:

annotated

to make more complicated, left , right y axes (data1 , data 3) have different range of values.

so summarise, here list of things need include:

  1. another scatter plot (data2, data1) in color e1c
  2. data1 has have histogram on left, in color e1c
  3. all histograms should have finer bins (say, 5x more bins).
  4. histogram on top (data2) should in color e2c.
  5. there should 2 y axis (one data1, data3).
  6. there should labels on each axis ("data 1", ...).

how accomplish this?


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -