updates
This commit is contained in:
@@ -439,7 +439,7 @@ plot!(zero, label="zero")
|
||||
(The job of `zero` is to return "$0$" in the appropriate type. There is also a similar `one` function in base `Julia`.)
|
||||
|
||||
|
||||
The `plot!` call adds a layer. We could still specify the limits for the plot, though as this can be computed from the figure, to plot `zero` we let `Plots` do it.
|
||||
The `plot!` call adds a layer. We could still specify the limits for the plot, though, as this can be computed from the figure, to plot `zero` we let `Plots` do it.
|
||||
|
||||
|
||||
For another example, suppose we wish to plot the function $f(x)=x\cdot(x-1)$ over the interval $[-1,2]$ and emphasize with points the fact that $0$ and $1$ are zeros. We can do this with three layers: the first to graph the function, the second to emphasize the $x$ axis, the third to graph the points.
|
||||
@@ -492,6 +492,8 @@ For plotting points with `scatter`, or `scatter!` the markers can be adjusted vi
|
||||
|
||||
Of course, zero, one, or more of these can be used on any given call to `plot`, `plot!`, `scatter`, or `scatter!`.
|
||||
|
||||
There are also several *shorthands* in `Plots` that allows several related attributes to be specified to a single argument that is disambiguated using the type of the value. (Eg. `line=(5, 0.25, "blue")` will specify the line have widht `5`, color `blue`, and alpha-transparency `0.25`.)
|
||||
|
||||
#### Example: Bresenham's algorithm
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user