Skip to content

Several vertical plots side-by-side on the same scale? #33

Open
@estan

Description

@estan

I'm in the process of trying to achive a series of side-by-side plots like this:

hole_plots

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions