5.9 Example 9: Simple Examples of Function Splicing

Here, we demonstrate simple use of function splicing (see section 3.7). In panel (a), we plot the function $ \sin(x)$, but specify that we only want it to be drawn in the range $ -2<x<7$. In panel (b), we show how to define a discontinuous function similar to a top-hat function, also demonstrating how to set movable boundaries between the spliced components of functions, in this case using the variable $ a$ for this purpose.

Panels (c) and (d) demonstrate a more complex example, involving the splicing of a two-dimensional function.




PyXPlot Script:

examples/example9



Dominic Ford 2006-09-09