How to set font size using TextItem.setText() in PyQtGraph?

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?

Answers


It is not documented, but the method you want is TextItem.setHtml().


Need Your Help

Native Swing Menu Bar Support For MacOS X In Java

java swing osx

A link that stands out is http://www.devdaily.com/blog/post/jfc-swing/handling-main-mac-menu-in-swing-application/ however the menu bar under Mac OS X displays as the package name as opposed to the

Double-type seconds between Joda-Time DateTimes

jodatime

I can get the integral number of seconds between two DateTimes using the Seconds class:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.