Menu

a scatter plot in C# zedgraph, how to make major ticks on X/Y axis located on the same value such that all grid cells are all squares

usact
2015-09-08
2015-09-08
  • usact

    usact - 2015-09-08

    I have searched solutions on line and in the forum, but I cannot find one. So, I post it here. If it is not a place to post it, please let me know, I will delete it, thanks.

    I need to add grid dash line on major ticks on a scatter plot generated by zedgraph in C# VS 2013 with windows form.

    I need to make sure that all major ticks on X and Y axis are located on the same value such that all grid cells are all squares.

    For example, on X axis, I have major ticks at

     (50,0), (100, 0), (150, 0)
    

    I need to get on Y axis with the same major ticks at

     (0, 50), (0, 100), (0, 150)
    

    When I add dash lines on all major ticks, all cells in the grid will be a square not a rectagular.

    My C# code:

    myPane.XAxis.MajorGrid.IsVisible = true;
    myPane.YAxis.MajorGrid.IsVisible = true;
    myPane.XAxis.MajorTic. // ?? I do not know how to dictate the location of a major tick on X axis.

    Any help would be appreciated.

     
  • BEN

    BEN - 2017-06-07

    I'm not sure to understand what you want.

    But you should put myPane.XAxis.MajorTic=myPane.YAxis.MajorTic
    myPane.XAxis.MajorStep=myPane.YAxis.MajorStep

    and try also myPane.XAxis.MajorGrid.DashOn

     

Log in to post a comment.

MongoDB Logo MongoDB