aerospaceresearch / orbitdeterminator

determination of satellite orbits and more
MIT License
181 stars 113 forks source link

Address matplotlib isse for equal aspect ratio #189

Closed Allan-Perez closed 3 years ago

Allan-Perez commented 4 years ago

Hey there, The #issue 188 here is an issue about scaling the axes of the 3d plots. I think this new code should solve it. I tested it and it worked in the orbit.csv dataset in the repo. Please if you have time test it with another data and make 100% sure it works well.

It's just a try-except block, where it tries the matplotlib function, and if it doesn't work (having in mind that they might solve it in the future), then use a little more rudimentary way: find the min and max values of all the dimensions, and scale all the axes to that range (stretching or squishing as needed), by using ax.set_xlim.

Please accept my apologies on the redundant line changes (changes like line 15 or 28). I think it may be some issue with my vim configuration. But the code should run equally good.

In order to test the code, simply run this file with the argument -f path/to/filename.csv.

Cheers!

hornig commented 3 years ago

how shall we continue here now, @PerezHz & @tacaswell? I would otherwise close it without merging it cause my personal view is not to fix too much with graph outputs so that the user system can scale it.

What you think? I would keep this open for one more week and without replies, I would close it.