View Full Version : How to hide axis labels
repepo
25th January 2011, 00:02
hi, is there a way to hide the tick labels (without hiding the ticks) from a plot? I can change their orientation with
setAxisLabelRotation(Qwt.QwtPlot.xBottom, -90)
and everything else but I don't know how to make them invisible... this is for a real time plotter and the labels are distracting/unnecessary. Suggestions are very welcome thanks!
Uwe
25th January 2011, 07:07
plot->axisScaleDraw( ... )->enableComponent(
QwtAbstractScaleDraw::Labels, false );
Uwe
repepo
25th January 2011, 15:57
Thank you so much Uwe!
p.s. I should have mentioned that I am using PyQt4.Qwt5. Just for reference, the actual python code I ended up using, based on Uwe's help is
import PyQt4.Qwt5 as Qwt
class MyPlotClass(QMainWindow):
...
def create_plot(self):
plot = Qwt.QwtPlot(self)
...
plot.axisScaleDraw(Qwt.QwtPlot.xBottom).enableComp onent( \
Qwt.QwtScaleDraw.Labels, False)
chriskon149
10th November 2011, 07:44
I'm currently trying to do the same thing with Qwt in Qt (using C++), but I'm having issues. My error says "invalid use of incomplete type 'struct QwtScaleDraw'".
How can I fix this error?
Thanks!
Chris
FelixB
10th November 2011, 07:57
have you included the header file?
chriskon149
10th November 2011, 08:03
FelixB,
That fixed it! Wow.... That was my bad for forgetting to do that, but thanks for catching it!
Chris
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.