Hallo, I am using Eclipse Nebula XYGraph for a Scientific Project. In my next graph I will need to display data points only and not the connecting line.

I tried setting the line width to zero (0), but this is not working.
trace.setLineWidth(0);

Any suggestion ?

       xyGraph = new XYGraph();
       xyGraph.primaryXAxis.setShowMajorGrid(true);
       xyGraph.primaryYAxis.setShowMajorGrid(true);     
       xyGraph.setBackgroundColor(ColorConstants.white);
                
       CircularBufferDataProvider traceDataProvider = new 
CircularBufferDataProvider(false);
       traceDataProvider.setBufferSize(1000);
for(Node node : resultList){
                double x = node.getX();
                double y = node.getX();
                // add data point
        traceDataProvider.addSample(new Sample(x, y));
       }

       // create the trace
       Trace trace = new Trace("Trace1-XY Plot", xyGraph.primaryXAxis, 
xyGraph.primaryYAxis, traceDataProvider);
// set trace property
       trace.setPointStyle(PointStyle.XCROSS);
                
       // How to NOT display the connecting line?
       trace.setLineWidth(0);

       // add the trace to xyGraph
       xyGraph.addTrace(trace);

Thanks in advance

To participate in the discussion, go here: 
https://www.eclipse.org/forums/index.php?t=rview&frm_id=64
_______________________________________________
nebula-dev mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/nebula-dev

Reply via email to