Closed russbate42 closed 6 months ago
Can you provide your exact setup? Which packages have you installed from conda, and which with pip?
conda 24.3.0
name: HEP channels:
dependencies:
Everything has been installed with conda except atlas-mpl-style, has been installed with pip, as it does not seem to be downloadable from conda-forge.
I've just set up precisely that with:
conda create -n HEP root=6.22.8 python=3.9.10 root-dependencies=6.22.8 matplotlib=3.8.4 scipy=1.12.0 pynvim=0.5.0 jupyterlab=4.1.5 numpy=1.26.4 pip=24.0 awkward=2.1.4 pandas=2.0.0 uproot=5.0.13 root_numpy=4.8.0 scikit-hep=5.1.1 -c conda-forge
conda activate HEP
pip install atlas_mpl_style
Then I opened an IPython shell in the environment and ran
import matplotlib.pyplot as plt
import atlas_mpl_style as ampl
ampl.use_atlas_style()
With this, I don't get any errors. I can then make a plot with plt.plot([0, 4], [3, 3])
and the plot uses the ATLAS stylesheet.
Do you have anything else earlier in your code, or other customizations to your environment?
Ok I exported the environment, deleted it, rebuilt it, and re-installed atlas-mpl-style. This worked. There must have been some conflict in the environment that was causing problems. Thank you!
As per the docs, using ampl.use_atlas_style() throws the following error:
Ubuntu 22.0.4 I am using the latest ROOT version with conda-forge 6.22/08 matplotlib: 3.8.4 atlas-mpl-style 0.21.0
the matplotlib config directory is in ~/.config/matplotlib and the atlas-mpl-style package is installed in ~/miniconda3/envs/HEP/lib/python3.9/site-packages/atlas_mpl_style
Following this: Customizing with style sheets
How can we get a conda environment to recognize 'atlas' as a valid style with this set up?