Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 915b34f

Browse files
committed
Merge remote-tracking branch 'upstream/v1.3.x'
Conflicts: lib/matplotlib/backends/qt4_editor/formlayout.py
2 parents 6982560 + 7565d07 commit 915b34f

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ def bar(self, left, height, width=0.8, bottom=None, **kwargs):
17761776
the y coordinate(s) of the bars
17771777
17781778
color : scalar or array-like, optional
1779-
the colors of the bars
1779+
the colors of the bar faces
17801780
17811781
edgecolor : scalar or array-like, optional
17821782
the colors of the bar edges

lib/matplotlib/backends/qt4_editor/formlayout.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,55 @@ def choose_color(self):
7979
def get_color(self):
8080
return self._color
8181

82+
<<<<<<< HEAD
8283
@QtCore.Slot("QColor")
84+
=======
85+
<<<<<<< HEAD
86+
@pyqtSignature("QColor")
87+
=======
88+
@QtCore.Slot("QColor")
89+
>>>>>>> 8bba2a4... Merge pull request #2328 from mspacek/qtapi
90+
>>>>>>> upstream/v1.3.x
8391
def set_color(self, color):
8492
if color != self._color:
8593
self._color = color
8694
self.emit(QtCore.SIGNAL("colorChanged(QColor)"), self._color)
8795
pixmap = QtGui.QPixmap(self.iconSize())
8896
pixmap.fill(color)
97+
<<<<<<< HEAD
98+
self.setIcon(QtGui.QIcon(pixmap))
99+
=======
100+
<<<<<<< HEAD
101+
self.setIcon(QIcon(pixmap))
102+
=======
89103
self.setIcon(QtGui.QIcon(pixmap))
90104

91105
color = QtCore.Property("QColor", get_color, set_color)
106+
>>>>>>> 8bba2a4... Merge pull request #2328 from mspacek/qtapi
107+
>>>>>>> upstream/v1.3.x
108+
109+
color = QtCore.Property("QColor", get_color, set_color)
92110

111+
<<<<<<< HEAD
93112
def col2hex(color):
94113
"""Convert matplotlib color to hex before passing to Qt"""
95114
return rgb2hex(colorConverter.to_rgb(color))
115+
=======
116+
<<<<<<< HEAD
117+
=======
118+
def to_qcolor(color):
119+
"""Create a QColor from a matplotlib color"""
120+
qcolor = QtGui.QColor()
121+
color = str(color)
122+
try:
123+
color = col2hex(color)
124+
except ValueError:
125+
#print('WARNING: ignoring invalid color %r' % color)
126+
return qcolor # return invalid QColor
127+
qcolor.setNamedColor(color) # set using hex color
128+
return qcolor # return valid QColor
129+
>>>>>>> 8bba2a4... Merge pull request #2328 from mspacek/qtapi
130+
>>>>>>> upstream/v1.3.x
96131

97132
def to_qcolor(color):
98133
"""Create a QColor from a matplotlib color"""

0 commit comments

Comments
 (0)