col=None
row=1
else:
row=None
hue = kwds["hue"]
wrap=int(kwds["wrap"])
kind = kwds["kind"]
x = kwds["x"]
if x == "":
x = "var"
aspect = 1.0
palette=kwds["palette"]
labels = list(df.select_dtypes(include=["object","category"]).columns)
t = pd.melt(df,id_vars=labels,
var_name="var",value_name="value")
print (t[10:20])
if hue == "":
hue=None
if col == "":
col=None
print(labels,hue,col)
try:
g = sns.factorplot(x=x,y="value",data=t, hue=hue, col=col, row=row,
col_wrap=wrap, kind=kind,size=3, aspect=float(aspect),
legend_out=True, sharey=False, palette=palette)
self.g = g
except Exception as e:
self.showWarning(e)
return
//need to always make a new canvas to get size right
for child in self.pf.winfo_children():
child.destroy()
self.fig, self.canvas = plotting.addFigure(self.pf, g.fig)
//self.fig.suptitle("test")
if kwds["despine"]==True:
sns.despine()
for ax in g.axes.flatten():
for t in ax.get_xticklabels():
t.set(rotation=30)
sns.set(font_scale=kwds["fontscale"])
plt.tight_layout()
self.fig.subplots_adjust(top=0.9, bottom=0.1)
self.canvas.draw()