PDA

View Full Version : Problem to plot 3D graph using QWT



johnMick
15th July 2011, 12:05
Hi,
I am newbie to the QT and QWT and I have to plot some 3D graph in QT and expected graph should be like attached picture(acttached picture is the plotting of value) but i am not getting any clue how to start plotting of this graph even i tried spectrogram contour graph example of QWT too but not able to understand the flow to plot this graph.Please help me to solve this problem.(It will be helpful if i will get some sample code to plot this type of graph using QWT)

Uwe
15th July 2011, 12:37
What type of samples do you have and how are they related to the objects in your screen shot ?

Uwe

FelixB
15th July 2011, 13:04
oh, sorry, I forgot to mentioon you should add relevant code and describe what happens.

wait... I did mention these things... so, please post relevant code parts!

johnMick
26th July 2011, 08:01
Hi,
I got a sample data for this graph
X-axis:(Frequency)
1.416452 2.032790 2.032786 2.032613 2.032959 2.032846 2.032729 2.032563 2.031888 2.031163
2.031563 2.083043 2.082000 2.083726 2.083486 2.083485 2.082834 2.082801 2.079814 2.082412
2.083914 2.401806 2.401648 2.401612 2.401708 2.401824 2.401298 2.401550 2.400701 2.696870
2.400812 2.707051 2.707639 2.706870 2.706890 2.706792 2.706399 2.707509 2.706951 2.715918
2.707717 2.742928 2.742301 2.742690 2.743624 2.743587 2.748697 2.739089 2.752182 3.262184
2.744462 3.260714 3.261101 3.260746 3.260220 3.260503 3.471024 3.261085 3.253883 3.468733
3.259980 3.475228 3.477248 3.474207 3.478586 3.472967 3.650063 3.477587 3.494362 3.540260
3.477757 3.542723 3.513207 3.552586 3.559186 3.564526 3.665473 3.515588 3.677819 3.660460
3.535312 3.660694 3.662807 3.658954 4.975923 3.658534 4.974311 3.662688 4.978288 4.975229
3.661804 4.976138 4.980911 5.082396 5.180460 4.972069 5.180311 4.982852 5.180475 5.180471
4.976698 5.180498 5.181077 5.179325 5.356285 5.301418 5.345700 5.180898 5.375346 5.353601
5.180462 5.359494 5.489517 5.501815 5.457556 5.426885 5.449278 5.393982 5.473591 5.460977
5.365880 5.460492 5.859846 5.859203 5.855795 5.855876 5.854865 5.592131 5.856456 5.854947
5.462417 5.856139 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
5.855843 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000


Y axis“Damping (°/°°):
-0.054375 -0.008574 -0.008735 -0.008509 -0.008486 -0.008498 -0.008692 -0.008660 -0.009098 -0.008528
-0.008428 0.011839 0.011841 0.011994 0.011533 0.011706 0.012332 0.012068 0.013128 0.016136
0.013497 0.006849 0.006699 0.007026 0.006871 0.006934 0.007434 0.006665 0.007123 0.026783
0.007118 -0.003321 -0.003274 -0.003277 -0.003390 -0.003380 -0.004396 -0.002887 -0.004783 -0.000391
-0.003589 0.019638 0.020176 0.019464 0.019523 0.019444 0.018343 0.019878 0.019213 -0.000545
0.020217 -0.001121 -0.001480 -0.001000 -0.001068 -0.000896 0.012676 -0.001494 -0.001324 0.018768
-0.001270 0.017510 0.018493 0.017154 0.015594 0.016913 0.001384 0.018293 0.023195 -0.067386
0.017330 -0.051969 -0.048151 -0.056356 -0.061752 -0.058434 -0.052753 -0.047158 0.003388 0.001606
-0.045203 0.000627 0.000844 0.000686 0.002674 0.000792 0.002493 0.000846 0.002806 0.002676
0.000341 0.002707 0.003187 -0.024307 -0.000215 0.002741 -0.000175 0.003233 -0.000280 -0.000204
0.002663 -0.000224 -0.000340 -0.000607 -0.011397 -0.009827 -0.013842 -0.000348 -0.008934 -0.011917
-0.000237 -0.010451 0.017223 0.015205 0.015411 0.015429 0.014778 0.004534 0.015250 0.015844
-0.010262 0.015666 0.007071 0.006596 0.008594 0.009916 0.009261 0.022476 0.007746 0.008519
0.015462 0.008437 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
0.008273 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000


I did some homework and found that i have to use QWTPlotMarker for plotting this graph but didnt get exactly how to plo,Now My query is:
1) z axis is shown on xtop axis as ecllipse., i think i have to QWTPLot marker and set symbol as Ellipse to plot zaxis, but how to attach this marker axis( as we do for setting colorbar ). Can you please provide sample code to do this?

2)For plotting values i feel i have to use setValues() method of Marker but how to do this?

Please give me some sample code so that i can understand the approach.

Thanks in advance.

Uwe
26th July 2011, 09:44
No - and once more: what type of samples ( probably x, y, z ) do you have and how are they related to the objects in your screen shot ?

Uwe