Hi Everyone,

I’m new here and I was wondering whether you could help me out with the 
following issue: I’m trying to draw in a netlogo plot from an extension written 
in Java.

To be precise, I would like to be able to draw in the “current” plot (created 
in NetLogo as usual) from the java code.

I think I have found all the methods I need in java but I don’t know how to use 
them on the plot created in netlogo.

This is actually my code, it’s just a test where I was trying to draw a line 
from (1,1) to (2,2).

public class FuzzyPlot extends DefaultCommand{
        
 public Syntax getSyntax(){
 return Syntax.commandSyntax(new int[]{Syntax.WildcardType()});
 }

 @Override
 public void perform(Argument[] arg0, Context arg1) throws ExtensionException, 
LogoException {
 DummyPlotManager dpm = new DummyPlotManager();
 //Here is where i dont know how to link with a plot in netlogo or the       
current plot
 Plot p = dpm.newPlot("test");
 PlotPen pen = p.createPlotPen("one", true);
 p.addPen(pen);
 p.currentPen_$eq(pen);
 pen.plot(1, 1, 1, true);
 pen.plot(2, 2, 1, true);
 dpm.compilePlot(p);
 }

}

Any help would be greatly appreciated.

Thx,
Marcos.

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to