Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
yt-project
GitHub Repository: yt-project/yt
Path: blob/main/doc/source/cookbook/changing_label_formats.py
928 views
1
import yt
2
3
ds = yt.load("IsolatedGalaxy/galaxy0030/galaxy0030")
4
5
# Set the format of the ionozation_label to be `plus_minus`
6
# instead of the default `roman_numeral`
7
ds.set_field_label_format("ionization_label", "plus_minus")
8
9
slc = yt.SlicePlot(ds, "x", ("gas", "H_p1_number_density"))
10
slc.save("plus_minus_ionization_format_sliceplot.png")
11
12