Plot transposing for simulation plotting #1810
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addressing #1072 need for transposing 2D plots produced from Simulations.
There is no simple matplotlib method for transposing Axes objects. It seems to have been overlooked as our use case of building axes by iteratively adding is rather uncommon. My current thinking leaves two options:
A. Manually perform a transposition on the finished axes object by rotating 90 degrees and mirroring the x axis.
B. Transpose each individual component of the simulation.
B seems an obscene amount of effort and opens up all sorts of risks of modifying in-place and copying the simulation so that the original simulation is unchanged for downstream operations.
The mirroring in A is simple because the
axes.invert_xaxis()
method handles this. The rotation is proving more challenging because you have to usefloating_axes
from matplotlibsaxisartist
module. These either aren't playing nice with the existing design, or I've not implemented them correctly, because the best I can do is part of the target subplot embedded within a larger blank figure. Will continue to consider other options and try explore this further.