I would like to ask how I could embed a sea tree figure in the wxPython panel.
Like this post, I want to embed an external shape in the wxPython panel. I need a specific panel of my wxPython GUI to plot the density profiles of my data based on the width of the Gaussian kernel, according to Seaborn kdeplot , as well as a scatter plot of the data points. Here is an example of what I would like to build in the panel: 
So far I have managed to get what I want in a separate figure from the wxPython panel. Can I embed a seashore plot in the wxPython panel, or find an alternative way to implement what I want?
Below is a specific part of my code that generates a chart if necessary:
import seaborn as sns import numpy as np fig = self._view_frame.figure data = np.loadtxt(r'data.csv',delimiter=',') ax = fig.add_subplot(111) ax.cla() sns.kdeplot(data, bw=10, kernel='gau', cmap="Reds") ax.scatter(data[:,0],data[:,1], color='r') fig.canvas.draw()
This piece of code displays the scattered data points in the wxPython panel and creates an external shape for the density loops. But, if I try ax.sns.kdeplot(...) , I get an error
Attribute Error: AxesSubplot object does not have .sns attribute
I do not know if I can insert a Seaborn shape into the wxPython panel, or should I try to implement it differently. Any suggestions?
Thanks in advance.
source share