0

Setting different grid spacing for X and Y axes

egovind 10 jaar geleden 0
Hi,

I'm new to Oxyplot and I'm stuck with something that ought to be easy. I want to set the X and Y axes grids to have different spacing - i.e. the Minor/Major steps on X and Y axes are different numerical quantities. However I find that the graph that comes out, uses the same grid spacing for both axes. I'm not sure what I'm doing wrong, my steps to create a plot are:

1. Create a new Plot Model (type = XY plot)
2. Create a Linear Axes corresponding to the X axes, and set the MajorStep/MinorStep. Add the X axes to the model.
3. Repeat 2 for Y axes, but with different Major and Minor Step.
4. Add the data series to the Plot Model and associate the Model with the PlotView.

However in the output plot, both the axes have the same spacing equal to what I set for Y axes. If I reverse steps 2 and 3, then the grid changes to that of the X axes. So it seems like both X and Y are drawn with the *latest* Major/Minor step setting... Any ideas what could be wrong?

Thanks!