You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm in the process of trying to achive a series of side-by-side plots like this:
The plots show results from the analysis of a drill core. The scale on the left is the depth down the drilled hole, and it should always be visible. The user should then be able to add and remove plots (showing e.g. element concentrations, rock density, ...) alongside this scale. In the sketch above I've shown two plots added, the first has two plot items, the second has one plot item.
My question is how to best accomplish this with PythonQwt?
My idea is to use a lone QwtScaleWidget for the scale, put it as the first item in a QHBoxLayout, and then each of the QwtPlot widgets in the same QHBoxLayout. But when using a "detached" QwtScaleWidget like this, how can I make sure that the QwtPlot widgets I put alongside it really line up with the scale properly? The positioning must be perfect, since the whole point is that the user can look at different results along the analysed core and compare them.
I'll also need to allow "zooming" and scrolling. I plan on implementing the zooming by simply adjusting the plot axis scale of all the plots simultaneously when the zoom is changed, and scrolling with a QScrollBar where I attach the scroll bar's rangeChanged signal to a slot that update the plot axis scale of all the plots. Do you see any immediate drawbacks to this approach?
The text was updated successfully, but these errors were encountered:
I realize the above was a little vague, so to be more brief/specific, my questions are:
How can I align the "origin" of multiple QwtPlot widgets to the origin of a separate QwtScaleWidget? The independent variable in each QwtPlot will be the same (the depth down the drill hole), but the dependent variables (element concentration, density, ...) can be on distinct scales, which is why I'm keeping them as separate plots (and also because you wouldn't want all the plot items in the same plot). E.g. in the above sketch, the scale of the plot to the right could have been say 0...50 instead of 0...100, so distinct from the one on the left.
Is there any way to accomplish the look above with a single plot? (I'm guessing not).
I'm in the process of trying to achive a series of side-by-side plots like this:
The plots show results from the analysis of a drill core. The scale on the left is the depth down the drilled hole, and it should always be visible. The user should then be able to add and remove plots (showing e.g. element concentrations, rock density, ...) alongside this scale. In the sketch above I've shown two plots added, the first has two plot items, the second has one plot item.
My question is how to best accomplish this with PythonQwt?
My idea is to use a lone
QwtScaleWidget
for the scale, put it as the first item in aQHBoxLayout
, and then each of theQwtPlot
widgets in the sameQHBoxLayout
. But when using a "detached"QwtScaleWidget
like this, how can I make sure that theQwtPlot
widgets I put alongside it really line up with the scale properly? The positioning must be perfect, since the whole point is that the user can look at different results along the analysed core and compare them.I'll also need to allow "zooming" and scrolling. I plan on implementing the zooming by simply adjusting the plot axis scale of all the plots simultaneously when the zoom is changed, and scrolling with a
QScrollBar
where I attach the scroll bar'srangeChanged
signal to a slot that update the plot axis scale of all the plots. Do you see any immediate drawbacks to this approach?The text was updated successfully, but these errors were encountered: