Hi,
I think Google Groups lost my reply to this... apologies if double posting.
Try getting the label property of the axis and using setFont() on that.
#...
font = self.plot.getAxis("left").label.font()
font.setFamily("Serif")
self.plot.getAxis("left").label.setFont(font)
self.plot.getAxis("left").setTickFont(font)
#...
Patrick
On Thursday, 5 August 2021 at 10:25:26 pm UTC+9:30 JJ wrote:
> Is there any workaround to support this? I can set the tick font as
> follows:
>
> plot_item = plotwidget1.getPlotItem()
> axis = plot_item.getAxis('bottom')
> font = QFont("Roboto")
> axis.setTickFont(font)
>
>
> However, there is no function to support the font style of the actual axis
> label.
> plot_item.setLabel('bottom', 'time') #how to change the font?
>
>
>
>
>
--
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/ba334518-b4d6-440f-b9cf-7c21d995bdcdn%40googlegroups.com.