Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Normalization of elevation and azimuth angles for surface plots#10762

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

jinshifen33
Copy link
Contributor

@jinshifen33jinshifen33 commentedMar 12, 2018
edited
Loading

PR Summary

This PR normalizes the input during the initialization of a surface plot in order to make the elevation and azimuth angles consistent throughout the plot.

Issue #10241

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant

@jinshifen33jinshifen33 changed the titleBugfix for issue 10241Normalization of elevation and azimuth angles for surface plotsMar 12, 2018
@WeatherGod
Copy link
Member

I need to think on this a bit. The original code intentionally flipped the display upside down, but I haven't a clue why anyone would want that. But, just because I can't think of a reason right now doesn't mean that it isn't supposed to be this way.

@jinshifen33
Copy link
ContributorAuthor

I found a use case, at least, that will make this fix useful.

Fromhttps://matplotlib.org/examples/mplot3d/rotate_axes3d_demo.html

With changing Elevation angle from (0-360) as an example.

In the current code base, the rotation will be discontinued at 270(i.e the 3d plot got flipped by 180deg) (see below)

orig

With the fixed code , it will complete one whole rotation(see the gif provided)

fixed

@jinshifen33
Copy link
ContributorAuthor

jinshifen33 commentedMar 14, 2018
edited
Loading

If you are referring to the flipping behaviour of the variable V, then I think it is a normal behaviour. The fix does not attempt to change that, the fix only normalizes the input angle on initialization of the view, to make it consistent throughout the plotting. As you might notice, it is not only the plot got flipped on z-direction 180 degree, the azimuth also got flipped on the original bug report.

else:
self.elev = elev
self.elev =art3d.norm_angle(elev)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

If you're going to normalize it at all, elevation should be normalized to[-90, +90]

Copy link
ContributorAuthor

@jinshifen33jinshifen33Mar 19, 2018
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@tacaswelltacaswell added this to thev3.0 milestoneMar 19, 2018
@jinshifen33
Copy link
ContributorAuthor

hey@WeatherGod , have you made up your mind?

@WeatherGod
Copy link
Member

you know what? That animation convinced me. I'll approve.

@eric-wieser
Copy link
Contributor

This still strikes me as the wrong fix. We should be normalizing it when we render, not when we store - there might be graphs that want to do something clever with the view angles, and expect them to be continuous.

@jinshifen33
Copy link
ContributorAuthor

it seems to me view_init is a method elevation and azimuth used in rendering.(they have to be stored some where)

if there are need for raw angle operation (non normalized) on elev and azimu, then have it done by implementing getter and setter on these two attributes.

and when start drawing, a call to view_init should normalize the operated angles.

And i dont understand what do you mean by "continuous" ..

@jinshifen33
Copy link
ContributorAuthor

jinshifen33 commentedApr 24, 2018
edited
Loading

@eric-wieser any thought ?

@jklymakjklymak modified the milestones:v3.0,v3.1Jul 16, 2018
@jklymak
Copy link
Member

Re milestoning 3.1 as this looks to need more discussion....

@jklymakjklymak modified the milestones:v3.1.0,v3.2.0Feb 11, 2019
@tacaswelltacaswell modified the milestones:v3.2.0,v3.3.0Aug 25, 2019
@QuLogicQuLogic modified the milestones:v3.3.0,v3.4.0Apr 30, 2020
@jklymakjklymak marked this pull request as draftAugust 24, 2020 14:20
@QuLogicQuLogic removed this from thev3.4.0 milestoneJan 21, 2021
@QuLogicQuLogic added this to thev3.5.0 milestoneJan 21, 2021
@QuLogicQuLogic modified the milestones:v3.5.0,v3.6.0Aug 23, 2021
@WeatherGod
Copy link
Member

WeatherGod commentedOct 25, 2021 via email

Most likely, you'll need to close this one and open a new one becauseyou'll need to push up new commits. Be sure to link back to this PR andmaybe even summarize important points.
On Mon, Oct 25, 2021 at 12:17 AM Scott Shambaugh ***@***.***> wrote: I'm going to adopt this issue, but it looks like@jinshifen33 <https://github.com/jinshifen33> hasn't been active on github since 2018. What's the best procedure - close this PR and I'll open a new one? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#10762 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AACHF6FVHB5ZM6CD4OZNQETUITK4JANCNFSM4EU6SJZA> . Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.

@scottshambaugh
Copy link
Contributor

I've rolled the fix for the original bug into PR#21426, I believe this PR can be closed.

@scottshambaugh
Copy link
Contributor

scottshambaugh commentedDec 3, 2021
edited
Loading

#21426 has been merged and so this PR can now be closed@WeatherGod.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@eric-wiesereric-wiesereric-wieser left review comments

@WeatherGodWeatherGodWeatherGod approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.6.0
Development

Successfully merging this pull request may close these issues.

8 participants
@jinshifen33@WeatherGod@eric-wieser@jklymak@scottshambaugh@tacaswell@QuLogic@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp