Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plotting a step function in Mathematica

I'm trying to plot a couple of UnitStep functions, but for some reason, Mathematica won't plot the whole function - Just the top (it doesn't look like a step, more like a line).

How do I tell mathematica to plot it all?

like image 436
Nitay Avatar asked Jan 24 '12 14:01

Nitay


1 Answers

An alternative to setting Exclusions -> None is to set ExclusionsStyle -> {style} if you want to draw the line segments connecting the discontinuities in a different style from the rest of the curve. For example

Plot[Round[n], {n, 0, 5}, ExclusionsStyle -> {Dashed}]

Mathematica graphics

like image 103
Heike Avatar answered Nov 05 '22 20:11

Heike