I get an error when adding titles / labels with specific colors and/or font sizes. Even running the example code leaves me with problems. I use Python 3.7.3 (through Spyder, iPython 7.6.1).
self.graphWidget.setTitle("Your Title Here", color='blue', size=30)
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\functions.py", line 182, in mkColor g = int(c*2, 16) ValueError: invalid literal for int() with base 16: 'll'
Changing the color to ‘black’ strangely leads to:
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\functions.py", line 222, in mkColor args = [r,g,b,a] UnboundLocalError: local variable 'r' referenced before assignment
When removing the color argument, I get:
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\LabelItem.py", line 61, in setText optlist.append('font-size: ' + opts['size']) TypeError: can only concatenate str (not "int") to str
Since obviously your code seems to work on the website and in the examples, is this Spyder / iPython related? And if so, how could I solve this?