Re: Axis Tick and Label !
Is your question about how to align the ticks to the inner side of the plot ?
Uwe
Re: Axis Tick and Label !
Quote:
Originally Posted by
Uwe
Is your question about how to align the ticks to the inner side of the plot ?
Uwe
Hi Uwe,
Yes, that's my second question.
My first question is why the tick at the maximum value of the x axis doesn't display when i disable the label.
Can you please give me any hint ?
Thanks
Re: Axis Tick and Label !
Quote:
Originally Posted by
huyhoangfool
My first question is why the tick at the maximum value of the x axis doesn't display when i disable the label.
In general I don't see a reason for this. Without running some code it is hard to say more.
Uwe
1 Attachment(s)
Re: Axis Tick and Label !
Quote:
Originally Posted by
Uwe
In general I don't see a reason for this. Without running some code it is hard to say more.
Uwe
Hi Uwe,
Thanks for response.
The code is done as following:
Quote:
QwtPlot *myPlot = new QwtPlot;
//Set Axis Scale
myPlot->setAxisScale(QwtPlot::xBottom, 0, 12);
myPlot->setAxisScale(QwtPlot::yLeft, 0, 120);
//Set Axis Title, Set Max Minor, Medium, Major
...
//Disable Label Component
myPlot->axisScaleDraw(QwtPlot::xBottom)->enableComponent(QwtAbstractScaleDraw::Labels, false);
When i use this line "myPlot->axisScaleDraw(QwtPlot::xBottom)->enableComponent(QwtAbstractScaleDraw::Labels, false);", the tick at the maximum value of x axis (value: 12) doesn't display.
If i set the pen width of the ScaleDraw to 2, that tick will display. But, it's very ugly.
Attachment 10529
Thanks
Re: Axis Tick and Label !
Looks like a bug in the layout code of QwtScaleWidget to me. Maybe subtracting one pixel from length in QwtScaleWidget::layoutScale() is the necessary fix.
Uwe