Open marscher opened 2 years ago
If we want to label the axes, we can simply iterate over all LCS, retrieve the coordinate unit and take the most common one for the plot. In this case, it wouldn't matter if all have the same or not. Additionally, we could add a unit parameter to the plot function so that the user can select his favorite unit. ;)
But shouldn't the least common unit be converted inside the LCS to the most common one? Otherwise there is a great potential for confusion. Agreed upon adding a unit parameter (which would then also trigger a convert).
Not sure why. As long as you "work" with the CSM all unit-related stuff is handled internally the moment it is relevant. If you extract an LCS, coordinates have still units attached. Only if you want to visualize it, a common unit is needed. But we can solve this the way I suggested.
we could also try enabling the matplotlib support of pint for our unit registry, ideally that would not require any conversion on our part but make it easy to set the desired output unit
This sounds like a very convenient solution. Thanks for pointing it out.
Assuming all LCS have the same units (is this case treated in CSM?) we should draw the unit for each axis label.