PDA

View Full Version : Configuration of the Axis Major in the QwtPlot::yLeft



Momergil
2nd December 2011, 16:55
Hello!

In the software in which I'm using Qwt I need to plot the QwtPlot::yLeft in the same ways as in this image:

7144

That means, the only numbers to be shown are the extreme ones: the lowest and the highest of the y Axis. I tried in several ways to change the QwtPlot->setAxisMaxMajor(QwtPlot::yLeft, XXX) and QwtPlot->setAxisMaxMinor(QwtPlot::yLeft, XXX) functions to do that, but I was unsuccessful. So, how do I do it?


Thanks!


Momergil

FelixB
5th December 2011, 07:54
Do you understand, what setAxisMajor and setAxisMinor do? these are the right methods... but how did you make them compile with parameter "XXX" instead of an integer value?

btw, in the upper two plots in your image, is it correct that maximum and minimum is both 60?

Momergil
5th December 2011, 15:10
Do you understand, what setAxisMajor and setAxisMinor do? these are the right methods... but how did you make them compile with parameter "XXX" instead of an integer value?

btw, in the upper two plots in your image, is it correct that maximum and minimum is both 60?

Hello!

By "XXX" I mean different integer values that I tried, but with all of them I was unsuccessful.

Now about both the minimum and maximum values of the images being 60, well that is an obvsious error that thanks God isn't my fault! ^^ But anyway that is just an example image, not to be taken that seriously. What matter is to plot only the lowest and highest values in the plot, and it seems to me that the two functions I mentioned are NOT the wright ones.

If they are, could you please tell me which values should I put in order to get what I want?

Thanks!!


Momergil

FelixB
6th December 2011, 07:56
Hi,

in my project it works fine with these methods... what happens when you set no minor ticks? and what happens with two major ticks?

I'm using qwt5.2, maybe something has changed in the latest version...

Felix