Thank you!

That works perfect for everything, except for the title:

font = self.plots[key]["item"].titleLabel.font()
font.setFamily("Serif")
self.plots[key]["item"].setFont(font)


Is there anything I overlook?

Greetings,
Fabian

On Tuesday, 19 February 2019 04:14:47 UTC+1, Patrick wrote:
>
> Hi,
>
> I don't know if this is the best way to do it, but something like this 
> works for axis labels:
>
> self.plot = self.addPlot()
> self.plot.setLabels(left="Left axis")
> font = self.plot.getAxis("left").label.font()
> font.setFamily("Serif")
> self.plot.getAxis("left").label.setFont(font)
> self.plot.getAxis("left").setTickFont(font)
>
> For other items, you may need to do something similar, but look at the 
> code to see what the QtGui.QGraphicsTextItem is called. For example, for a 
> TextItem (
> http://www.pyqtgraph.org/documentation/_modules/pyqtgraph/graphicsItems/TextItem.html#TextItem
>  
> <http://www.google.com/url?q=http%3A%2F%2Fwww.pyqtgraph.org%2Fdocumentation%2F_modules%2Fpyqtgraph%2FgraphicsItems%2FTextItem.html%23TextItem&sa=D&sntz=1&usg=AFQjCNGQNEL_u8nhMp3Hskz2wvS7PUO38g>)
>  
> you would use t.textItem.font() and t.textItem.setFont().
>
> Patrick
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/f67dffa4-3914-42fc-89ba-197939989b5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to