Quick question about lines and pen-down

188 views
Skip to first unread message

jkg

unread,
Feb 18, 2021, 12:07:34 AM2/18/21
to netlogo-users
I am using "pen-down" to draw the paths that agents take. My question is, can this line be changed to a dashed line, dotted line, circle chain line, etc? I need to distinguish between lines created by 5 agents and changing the color isn't sufficient.

thanks

Aaron Andre Brandes

unread,
Feb 18, 2021, 5:22:43 PM2/18/21
to jkg, netlogo-users

Hi,

I don’t think you can directly make the line dotted etc, but you should be able to make 5 distinguishable paths.

 

You can change the thickness of the lines  e.g.

ask turtle 0 [ set color orange set pen-size 3 pen-down fd 10]

 

Thicker lines should be easier to distinguish by color, and different pen-sizes could help distinguish similar colors.

I also recommend the palette extension.

The palette:scale-scheme command lets you create a specified number of colors that can have properties such as"Divergent."

You can get more than 5 clearly distinguishable colors. You can explore the color options at http://www.colorbrewer.org.

 

If your turtles are making small moves, you might consider giving them different shapes, and making use of the stamp command to create a trail.

You can also combine pen lines with stamp(ing) to help distinguish your paths.

 

Happy trails,

Aaron

 

-- 

Aaron Brandes, Software Developer

Center for Connected Learning and Computer-Based Modeling

--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/5a22b3d3-661d-4ed4-b9be-0741c2b85a54n%40googlegroups.com.

Stephen Guerin

unread,
Feb 18, 2021, 11:48:35 PM2/18/21
to Aaron Andre Brandes, jkg, netlogo-users
This is a follow on to Aaron's excellent suggestion of stamping turtle shapes if the turtles are making small moves. If the turtles are making big moves, you can stamp instead stamp *links* with different shapes including dashed and three lines. 

The hack is to have an invisible trailing turtle to make the link. You can also vary the link thickness.

image.png



image.png
_______________________________________________________________________
Stephen...@Simtable.com
CEO, Simtable  http://www.simtable.com
1600 Lena St #D1, Santa Fe, NM 87505
office: (505)995-0206 mobile: (505)577-5828
twitter: @simtable


dashedLines.nlogo

Aaron Andre Brandes

unread,
Feb 19, 2021, 10:45:30 AM2/19/21
to Stephen Guerin, jkg, netlogo-users

Very nice!

Aaron

 

-- 

Aaron Brandes, Software Developer

Center for Connected Learning and Computer-Based Modeling

 

 

From: Stephen Guerin <stephen...@simtable.com>
Date: Thursday, February 18, 2021 at 11:48 PM
To: Aaron Andre Brandes <aaron....@northwestern.edu>, jkg <jkg...@yahoo.com>
Cc: netlogo-users <netlog...@googlegroups.com>
Subject: Re: [netlogo-users] Quick question about lines and pen-down

 

This is a follow on to Aaron's excellent suggestion of stamping turtle shapes if the turtles are making small moves. If the turtles are making big moves, you can stamp instead stamp *links* with different shapes including dashed and three lines. 

The hack is to have an invisible trailing turtle to make the link. You can also vary the link thickness.





Reply all
Reply to author
Forward
0 new messages