kur*_*sis 6 python matplotlib seaborn
我试图找出matplotlib和seaborn绘图函数是如何关联的.特别是,我想知道什么样的pyplot参数可以传递给关键字dicts marginal_kws和annot_kws函数seaborn.jointplot().
假设我们有data包含列c0和的DataFrame c1.我猜测joint_kws接受来自的参数pyplot.hexbin(),所以当我试图用那里的参数调整外观时,它工作得很好:
import seaborn as sns
sns.jointplot('c0', 'c1', data=data, kind='hex',
joint_kws={'gridsize':100, 'bins':'log', 'xscale':'log', 'yscale':'log'})
Run Code Online (Sandbox Code Playgroud)
然后我试图在直方图轴与参数设置日志规模log=True从pyplot.hist():
sns.jointplot('c0', 'c1', data=data, kind='hex',
joint_kws={'gridsize':100, 'bins':'log', 'xscale':'log', 'yscale':'log'},
marginal_kws={'log':True})
Run Code Online (Sandbox Code Playgroud)
这导致了
TypeError: distplot() got an unexpected keyword argument 'log'
Run Code Online (Sandbox Code Playgroud)
怎么说得对?
PS这个问题不是关于在seaborn中设置日志比例(JointGrid我知道),而是将matplotlib参数作为一个整体传递给seaborn函数.