Interaction plot for factor level statistics
uses pandas.DataFrame to calculate an aggregate statistic for each level of the factor or group given by trace.
Parameters : | x : array-like
trace : array-like
response : array-like
func : function
plottype : str {‘line’, ‘scatter’, ‘both’}, optional
ax : axes, optional
xlabel : str, optional
ylabel : str, optional
colors : list, optional
linestyles : list, optional
markers : list, optional
kwargs :
|
---|---|
Returns : | fig : Figure
|
Examples
>>> import numpy as np
>>> np.random.seed(12345)
>>> weight = np.random.randint(1,4,size=60)
>>> duration = np.random.randint(1,3,size=60)
>>> days = np.log(np.random.randint(1,30, size=60))
>>> fig = interaction_plot(weight, duration, days,
... colors=['red','blue'], markers=['D','^'], ms=10)
>>> import matplotlib.pyplot as plt
>>> plt.show()
(Source code, png, hires.png, pdf)