plotchartsilnumerics

How to control the position of the origin in ILPlotCube?


When I plot data with ILPlotCube, the (0,0) origin is displayed with some offset (margin/gap) from the x and y axes. How can I remove this offset?


Solution

  • You can use the ILLimits.Set

    For example:

     var start = -2;
     var sz = 6;
    
     ILArray<float> x = Enumerable.Range(start, sz).ToArray();
     var pc = new ILPlotCube(twoDMode: true)
     {
         new ILLinePlot(x)
     };
    
     pc.Limits.Set(new Vector3(0, start + sz - 1, 0), new Vector3(sz - 1, start, 0));
    

    Added (01/12/2016)

    My understanding was: you want to get rid of the space noted in the red circle? Get rid of red circle Also changed the code a bit.