NetLogo banner

Home
Download
Help
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

  Donate

NetLogo Models Library:
Code Examples

(back to the library)

Plot Smoothing Example

[screen shot]

If you download the NetLogo application, this model is included. You can also Try running it in NetLogo Web

WHAT IS IT?

This code example shows you how to plot a "smoothed" version of a jagged line. When you run the model, the black line is the original line, and the blue line is the smoothed version.

The amount of smoothing is controlled by the SMOOTHNESS slider.

The black line is generated by doing a one-dimensional random walk.

THINGS TO NOTICE

The very simple method used to do smoothing causes the smoothed line to lag a bit behind the original line, that is, it appear shifted to the right.

CREDITS AND REFERENCES

Thanks to Ed Hazzard for suggesting this example.

(back to the NetLogo Models Library)