# Imports
import numpy.random as nprand
import pyqtgraph as pg
# Create a window with one plot
win=pg.GraphicsWindow()
pi=win.addPlot(row=0,col=0)
pi.plot(nprand.random_integers(0,high=10,size=50))
# Set labels on that plot
pi.setLabels(title="Bad component i-v",left="Current [mA]")
labelStyle = {'color': '#FFF', 'font-size': '14pt'}
pi.getAxis("bottom").setLabel('Voltage', units='V', **labelStyle)
This code shows the title and the left axis label, but not the bottom label. If I remove ", **labelStyle", then it works (but, of course, with no styling!). Any suggestions?
Thanks,
Sam
# Set labels on that plotpi.setLabels(title="Bad component i-v",left="Current [mA]")
labelStyle = {'color': '#FFF', 'font-size': '14pt'}
pi.getAxis("bottom").setLabel('Voltage', units='V', **labelStyle)
This code shows the title and the left axis label, but not the bottom label. If I remove ", **labelStyle", then it works (but, of course, with no styling!). Any suggestions?
--To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/CACZXET_-AAx5KQDMPrZmERQZyoBxC6%3D05UU3KUtodfCAtWgWGg%40mail.gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "pyqtgraph" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyqtgraph/9pwTS7goAfw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyqtgraph+...@googlegroups.com.