Pyqtgraph plotwidget: cannot change font weight of axis ticks to BOLD

415 views
Skip to first unread message

Azar Jabbarli

unread,
Jun 29, 2020, 12:31:43 PM6/29/20
to pyqtgraph
How can I make x axis ticks bold?
plot_1 = pg.PlotWidget()
plot_1.setBackground('w')
pen = pg.mkPen(color="k", width=3, style=QtCore.Qt.SolidLine)

plot_1 .setTitle("Title", color="k", size="18pt")
plot_1 .plot(xvals, yvals, pen=pen)
styles = {'color': 'r', 'font-size': '12px', 'font-weight': 'bold'}
plot_1 .setLabel('bottom', 'X label', **styles)

Patrick

unread,
Jun 30, 2020, 3:07:20 AM6/30/20
to pyqtgraph
Hi,

Does the technique in this thread work? Something similar, but change
font.setFamily("Serif")
to
font.setBold(True)


Patrick
Reply all
Reply to author
Forward
0 new messages