Disable limit axles on assembly using marine package

I like this particular plot and the ability to pass a function to the stat_func keyword to quickly build and visualize relationships between variables, but there is one thing. How to "turn off" or not build boundary distribution axes?

It looks good, but sometimes I don't need this feature.

For example, using this code:

import numpy as np import seaborn as sns x = (np.arange(100) + np.random.randn(100)*20 y = (np.arange(100) + np.random.randn(100)*20 sns.jointplot(x, y, kind='reg') 

How can I remove the kde subnets on the top and right of the main axes?

+5
source share
1 answer

You can directly use JointGrid :

 from scipy import stats g = sns.JointGrid(x, y, ratio=100) g.plot_joint(sns.regplot) g.annotate(stats.pearsonr) g.ax_marg_x.set_axis_off() g.ax_marg_y.set_axis_off() 

enter image description here

+9
source

Source: https://habr.com/ru/post/1211442/


All Articles