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

set_altitude, set_azimuth were disabled by new spec code #63

Closed
mars0i opened this issue Jul 9, 2017 · 1 comment
Closed

set_altitude, set_azimuth were disabled by new spec code #63

mars0i opened this issue Jul 9, 2017 · 1 comment

Comments

@mars0i
Copy link
Contributor

mars0i commented Jul 9, 2017

The new spec code in surf and mesh disables set_azimuth and set_altitude because it causes the azimuth and altitude fields in page to be ignored.

These fields and functions are recent additions. The functions set azimuth and altitude fields in page that had been given default values by _create_page. Now the fields in the page are set from within surf and mesh by

  p.altitude <- _get_altitude spec 33.;
  p.azimuth <- _get_azimuth spec 115.;

so if these values were changed by the set_ functions, the values are ignored. Maybe something like this would be better?

  p.altitude <- _get_altitude spec p.altitude;
  p.azimuth <- _get_azimuth spec p.azimuth;

_create_page is setting the defaults to 33. and 115. respectively, so the behavior shouldn't change in other respects.

I thought about removing the set_ functions, but I think it's useful to be able to set the altitude and azimuth and have the new values apply by default to a series of surf or mesh calls.

CORRECTION: That doesn't really work because each subplot or plot page has a new page structure, so the azimuth and altitude don't persist between calls to surf and mesh, unless one is writing multiple 3D plot calls on one subplot, which would be rare enough that it wouldn't matter.

So maybe set_altitude and set_azimuth should be removed, and the default values left in hardcoded surf and mesh?

@ryanrhymes
Copy link
Member

ryanrhymes commented Jul 10, 2017

  p.altitude <- _get_altitude spec p.altitude;
  p.azimuth <- _get_azimuth spec p.azimuth;

Yes, this is better than my current code so I have changed it, many thanks.

So maybe set_altitude and set_azimuth should be removed, and the default values left in hardcoded surf and mesh?

I agree that it is not very common to call 3d plot multiple times in one figure, so I have removed the set_altitude and set_azimuth for the time being. But it can be added back in future whenever the usecase becomes clear.

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

No branches or pull requests

2 participants