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: incorrect LaTeX typesetting in ylabel for fractions #3636

Closed
neutrinoceros opened this issue Nov 1, 2021 · 2 comments · Fixed by #3637
Closed

BUG: incorrect LaTeX typesetting in ylabel for fractions #3636

neutrinoceros opened this issue Nov 1, 2021 · 2 comments · Fixed by #3637

Comments

@neutrinoceros
Copy link
Member

Bug report

Bug summary

Just noticed this in some image reference used for testing:
Screenshot 2021-11-01 at 09 29 15

The bug is that parenthesis should be bigger around a fraction. This is very similar to a bug that was fixed in #3282, but apparently we missed some cases.

@neutrinoceros
Copy link
Member Author

So I thought the issue was in ProfilePlot but I can't reproduce the bug with the following script

import yt

ds = yt.load_sample("IsolatedGalaxy/galaxy0030/galaxy0030")
sphere = ds.sphere("c", (100.0, "kpc"))
plot = yt.ProfilePlot(
    sphere,
    ("gas", "temperature"),
    ("gas", "density"),
    weight_field=("gas", "mass"),
)
plot.save("/tmp/profile_test.png")

profile_test_1d-Profile_temperature_density

@neutrinoceros
Copy link
Member Author

indeed the failing plot is of class LinePlot, not ProfilePlot.
Here's a reproducer:

import yt
ds = yt.load_sample("IsolatedGalaxy")
plot = yt.LinePlot(
    ds,
    [("gas", "density")],
    (0.0, 0.0, 0.0), (0.0, 1.0, 0.0), 1000
)

plot.save("/tmp/lineplot_test.png", mpl_kwargs=dict(bbox_inches="tight"))

lineplot_test

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