-
Notifications
You must be signed in to change notification settings - Fork 0
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
environment, stylesheet, etc. #26
Conversation
@@ -150,10 +150,12 @@ def set_plot_attrs(attr_dict, xr_obj, ax): | |||
|
|||
if 'ylabel' in attr_dict: | |||
if 'yunits' in attr_dict and len(get_attributes(attr_dict['yunits'], xr_obj)) >= 1: # second condition avoids '[]' as label | |||
ax.set_ylabel(get_attributes(attr_dict['ylabel'], xr_obj) + ' (' + | |||
get_attributes(attr_dict['yunits'], xr_obj) + ')') | |||
ylabel = wrap_text(get_attributes(attr_dict['ylabel'], xr_obj) + ' (' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap_text pourrait être ajouter à xlabel et title.
Les longueurs de strings pourraient être modifier en fonction de s'il s'agit du titre (timeseries vs gridmap), label, colorbar.
Sinon pour les titres il serait aussi possible d'utiliser textwrap (https://docs.python.org/3/library/textwrap.html)
""" Return a list of the categorical colors associated with certain strings (SSP,RCP,CMIP).""" | ||
path = Path(__file__).parents[1] / 'data/ipcc_colors/categorical_colors.json' | ||
with open(path) as f: | ||
cat = json.load(f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Est-ce que les couleurs associées aux modèles (CanESM5, MPI,...) sont dans le json?
ytick.color : k | ||
|
||
### FIGURE | ||
figure.figsize : 8, 6 # default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourrait être dans une autre stylesheet pour avoir une version notebook, article ou présentation.
modified environment.yml, added stylesheet, added func to show list of categorical colors, improved checks in timeseries()