Closed kubapilch closed 1 year ago
Ok I will fix that. For the moment you can set the red hex color
self.ax1.plot(x, y,label='line 1', color='#FF0000') #red color
Ok I will fix that. For the moment you can set the red hex color
self.ax1.plot(x, y,label='line 1', color='#FF0000') #red color
That's exactly how I do it now. I posted an issue to make you aware of it, maybe you don't want to allow it but handle the error differently.
you can also used this function from matplotlib https://matplotlib.org/stable/api/_as_gen/matplotlib.colors.to_hex.html
If we want to specify a color of the line inside
GraphGenerator
like soLegendRv
crashes the program with following exception:ValueError: invalid literal for int() with base 16: 'r'
. The error happens in this line: https://github.com/mp-007/kivy_matplotlib_widget/blob/5a9a55d8e23e7f70c62a709b43b3a359037b911b/kivy_matplotlib_widget/uix/legend_widget.py#L196 Whenkivy.utils
functionget_color_from_hex
receivesred
instead of a hex value. It works perfectly fine without theLegendRv
Minimal code to reproduce the error: