+3
En revisión

multiple plots

mike hace 4 años en API • actualizado hace 4 años 6
Hi, 

I would like to know if there is an easy way to create multiple subplots in a single PlotModel. 
Obviously I can just create several PlotModels and achieve something similar, but is there a better more elegant way to do it?

Thanks, 
Mike
Well, a PlotModel can only take one Series, so I think you can only have one plot per PlotModel.  What's not elegant about having multiple PlotModels?  If you have a specific requirement of having subplots under one wrapper, I would probably derive from PlotModel or perhaps create a class that uses multiple PlotModels, and adjust your wrapper to meet that requirement.  I haven't been using OxyPlot long enough, though, so there may be a better way.
Well, PlotModel can actually take more than one Series as can be seen from the code.
The problem begins when these multiple series have different view resolution and zooming is performed on multiple series at once. Not ideal. It seems like my only option is to actually have multiple PlotModels.
Hmm, I didn't know it could do that.
Can you be more specific about what you mean with subplots? Do you mean you would like to have multiple panes with separate axis aligned on either the vertical or horizontal dimension? Are you interested in sharing the X or Y axis?
+2
En revisión
I think subplots would be a great feature, but it requires some architecture refactoring of the `PlotView`s.
I think each subplot should be defined by one PlotModel (yes, it can contain multiple series) and then you compose the view by a grid of subplots defined by column, row, colspan and rowspan.

https://github.com/oxyplot/oxyplot/issues/55
Glad you think it is a good feature to add.

Looking forward to this feature! For now I will have to add several PlotModels, I guess.