You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I wanted to use gray-scale colormap and add labels. july.calendar_plot and july.month_plot allowed me to add labels (a.k.a. ticks, values inside calendar cells) with value_label=True param, but did not allow me to change the color of these labels.
Objects of matplotlib.axes.Axes.text class have color or c - color parameter documentation link.
We might add additional param responsible for color of values or transfer **kwargs
Describe alternatives you've considered, if relevant
Mayhap there are other ways to fix it
Additional context
Same issue may occur with other colormaps - it is difficult to separate dark colors from dark backgrounds (or to separate same tints, shades, tones in general). Also, color are important both from æsthetical and accessibility points see
The text was updated successfully, but these errors were encountered:
Workaround solution
Currently, to change the color (or other properties) of text of values one may use functionality of rather "advanced" matplotlib:
Create the chart "as-is" with value_label=True
Get these texts (matplotlib.text.Text objects) children artists (ax.get_children() function) from objects of matplotlib.axes._subplots.AxesSubplot class
> `ax[indx].texts` or custom loop over `ax[indx].get_children()`
Set desired color manually for these texts objects
> `plt.setp(ax[indx].texts, color=color)` or custom loop with `Text.set_color(color)`
Describe the workflow you want to enable
Hi all, I wanted to use gray-scale colormap and add labels.
july.calendar_plot
andjuly.month_plot
allowed me to add labels (a.k.a. ticks, values inside calendar cells) withvalue_label=True
param, but did not allow me to change the color of these labels.Example image and code attached
Describe your proposed solution
https://github.com/e-hulten/july/blob/master/src/july/helpers.py#L116
matplotlib.axes.Axes.text
class havecolor or c - color
parameter documentation link.**kwargs
Describe alternatives you've considered, if relevant
Mayhap there are other ways to fix it
Additional context
Same issue may occur with other colormaps - it is difficult to separate dark colors from dark backgrounds (or to separate same tints, shades, tones in general). Also, color are important both from æsthetical and accessibility points see
The text was updated successfully, but these errors were encountered: