When creating a TextItem to be added to a plotItem in PyQtGraph, I know it is possible to format the text using html code, however I was wondering how to format the text (i.e. change font size) when updating the text through TextItem.setText()? or do I need to destroy/re-create a TextItem?
It is not documented, but the method you want is TextItem.setHtml().
How to set font size using TextItem.setText() in PyQtGraph?