Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5cc6a15 + e996655 commit b7eb868Copy full SHA for b7eb868
lib/matplotlib/backends/backend_wx.py
@@ -418,23 +418,7 @@ def set_joinstyle(self, js):
418
def get_wxcolour(self, color):
419
"""Convert a RGB(A) color to a wx.Colour."""
420
_log.debug("%s - get_wx_color()", type(self))
421
- if len(color) == 3:
422
- r, g, b = color
423
- r *= 255
424
- g *= 255
425
- b *= 255
426
- return wx.Colour(red=int(r), green=int(g), blue=int(b))
427
- else:
428
- r, g, b, a = color
429
430
431
432
- a *= 255
433
- return wx.Colour(
434
- red=int(r),
435
- green=int(g),
436
- blue=int(b),
437
- alpha=int(a))
+ return wx.Colour(*[int(255 * x) for x in color])
438
439
440
class _FigureCanvasWxBase(FigureCanvasBase, wx.Panel):
0 commit comments