Hello,
I have a Qwt plot that displays the X-Axis in units of digital samples. My data series is 10 samples for example, data = [ 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 ]. My x-axis actually corresponds to a length in mm, where 10 Samples = 3 mm. How can I draw the axis so the same data is plotted, but I display a different scale? See the example graph I've drawn below. In reality, I have 512 Samples that correspond to ~3 mm, but I believe this is effectively the same.
Thank you in advance!
Ryan
plotting data that consists of 10 samples
data = [ 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 ]
110 + : : : : : : : : : :
100 + : : : : : : : : x :
90 + : : : : : : : x : :
80 + : : : : : : x : : :
70 + : : : : : x : : : :
60 + : : : : x : : : : :
50 + : : : x : : : : : :
40 + : : x : : : : : : :
30 + : x : : : : : : : :
10 + x : : : : : : : : :
10 x : : : : : : : : : :
0 --+--+--+--+--+--+--+--+--+--+--+
| | | | | | | | | | |
0 2 4 6 8
(Samples)
plotting data that consists of 10 samples
data = [ 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 ]
110 + : : : : : : : : : :
100 + : : : : : : : : x :
90 + : : : : : : : x : :
80 + : : : : : : x : : :
70 + : : : : : x : : : :
60 + : : : : x : : : : :
50 + : : : x : : : : : :
40 + : : x : : : : : : :
30 + : x : : : : : : : :
10 + x : : : : : : : : :
10 x : : : : : : : : : :
0 --+--+--+--+--+--+--+--+--+--+--+
| | | | | | | | | | |
0 2 4 6 8
(Samples)
To copy to clipboard, switch view to plain text mode
Draw X Axis to a new scale where 10 Samples = 3 mm
0 S => 0 mm
1 S => 0.3 mm
2 S => 0.6 mm
3 S => 0.9 mm
.
.
.
9 S => 2.7 mm
110 + : : : : : : : : : :
100 + : : : : : : : : x :
90 + : : : : : : : x : :
80 + : : : : : : x : : :
70 + : : : : : x : : : :
60 + : : : : x : : : : :
50 + : : : x : : : : : :
40 + : : x : : : : : : :
30 + : x : : : : : : : :
10 + x : : : : : : : : :
10 x : : : : : : : : : :
0 --+--+--+--+--+--+--+--+--+--+--+
| | | | | | | | | | |
| | | | |
0 0.6 1.2 1.8 2.4
(mm)
Draw X Axis to a new scale where 10 Samples = 3 mm
0 S => 0 mm
1 S => 0.3 mm
2 S => 0.6 mm
3 S => 0.9 mm
.
.
.
9 S => 2.7 mm
110 + : : : : : : : : : :
100 + : : : : : : : : x :
90 + : : : : : : : x : :
80 + : : : : : : x : : :
70 + : : : : : x : : : :
60 + : : : : x : : : : :
50 + : : : x : : : : : :
40 + : : x : : : : : : :
30 + : x : : : : : : : :
10 + x : : : : : : : : :
10 x : : : : : : : : : :
0 --+--+--+--+--+--+--+--+--+--+--+
| | | | | | | | | | |
| | | | |
0 0.6 1.2 1.8 2.4
(mm)
To copy to clipboard, switch view to plain text mode
Bookmarks