QCustomPlot Discussion and Comments

real scale on yAxis Return to overview

hi, i'm using Qcustumplot to draw a graph from a csv file.
i just want to know if there is a way to get the real scale on the yAxis , cause the data is in centimeter and i need to get the real variations when plotting the graph.
any solutions ? thanks for response.

What do you mean by real scale?
What are the values you have? Can you provide an example?
What is the type of values in the xAxis?
Have you called QCustomPlot::rescaleAxes();?

i mean full scale.
the problem is i want to plot my data in the real dimension, cause in my csv file i have a column of values expressed in centimeter,and that's what i put in my yAxis so i want to have the real dimension in the yAxis.
in other terms , i want a way to change the spacing between the steps in my yAxis.
is it possible?

QCustomPlot just needs 2 arrays - one with the x-Axis values and one with the y-Axis values.

The distance between the x-values will display as wished. So just give those values summed to the x-axis:

Original Data:

1,2,1,3,4

Display Data:
1,3,4,7,11

i think he meant he wants it to be scaled to actual size of screen based on DPI.

i mean i want the distance between every step in my yAxis to be precisely 1 centimeter.
the distance should be 1cm between every echelon.

hi,
i 've done some researchs and i found this class QCPAxisTicker that create ticks positions and labels, i found the method QCPAxisTicker::getTickStep that i think would help me out with changing the distance between every tick step.
but i don't know how to use this class .
can you give me an example using this class ?