Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot transposing for simulation plotting #1810

Draft
wants to merge 1 commit into
base: pre/2.8
Choose a base branch
from

Conversation

m-bone
Copy link
Contributor

@m-bone m-bone commented Jul 9, 2024

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 use floating_axes from matplotlibs axisartist 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.

There's no simple way to transpose an Axes object
First attempts to rotate and mirror the plot showed promise but have hit a wall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant