KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have an application where I have one figure with nine line plot sub-plots (3x3) and I want to let the user select one of the charts and have a small wx Python application open up to allow editing and zooming on the specified sub-plot. Is it possible to grab all the information from the selected sub-plot, i.e. axis labels, axis formatting, lines, tick sizes, tick labels, etc and plot it quickly on the canvas of the wx application? My current solution is too long and bulky, as I just re-do the plot that the user selects. I was thinking something like this, but it doesn't work quite right. #ax is a dictionary containing each instance of the axis sub-plot selected_ax = ax[6] wx_fig = plt.figure(**kwargs) ax = wx_fig.add_subplots(111) ax = selected_ax plt.show() Is there a way to save the properties from getp(ax) to a variable and use selected properties of that variable with setp(ax) to construct a new chart? I feel this data must be accessible somehow, given how quickly it prints when you call getp(ax), but I can't even get the following code to work on an axis with two y-axes: label = ax1.yaxis.get_label() ax2.yaxis.set_label(label) I have a feeling this isn't possible, but I thought I would ask anyways.
Tags (comma-separated)
Save Edits
Cancel