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

BUG: plot bounds are not computed correctly in cylindrical coordinates #3819

Closed
neutrinoceros opened this issue Feb 20, 2022 · 1 comment · Fixed by #3820
Closed

BUG: plot bounds are not computed correctly in cylindrical coordinates #3819

neutrinoceros opened this issue Feb 20, 2022 · 1 comment · Fixed by #3820

Comments

@neutrinoceros
Copy link
Member

Bug report

Bug summary

Code for reproduction

import yt
from yt.testing import fake_amr_ds, add_noise_fields

yt.load_uniform_grid(
    {},
    shape,
    bbox=np.array([[1, 5], [0.1, np.pi - 0.1], [0, 1]]),
    geometry="polar",
)
add_noise_fields(ds)
p = yt.SlicePlot(ds, "z", "noise1")
p.save("/tmp/")

Actual outcome
UniformGridData_Slice_z_noise1

Expected outcome
We shouldn't waste half of the image space.
This is very similar to #3529

@neutrinoceros
Copy link
Member Author

There's a similar issue for r-normal plots

import numpy as np
import yt
from yt.testing import fake_amr_ds, add_noise_fields

shape = (32, 64, 128)
ds = yt.load_uniform_grid(
    {},
    shape,
    bbox=np.array([[1, 5], [0.1, np.pi / 2 - 0.1], [0, 1]]),
    geometry="polar",
)
add_noise_fields(ds)
p = yt.SlicePlot(ds, "r", "noise1")
p.save("/tmp/")

UniformGridData_Slice_r_noise1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant