Plotting functions with different domain
- To: mathgroup at yoda.physics.unc.edu
- Subject: Plotting functions with different domain
- From: twj
- Date: Wed, 21 Apr 93 08:13:34 CDT
Johannes Idsoe writes: >I have the functions f, g and h. >They all have different D_f], D_g] and D_h]) >Plot[{f,g,h},{x,a,b}] does not give me the right plot since >only one of the functions have the domain [a,b]. >How can I plot all three functions and only get the >functions plotted in the domains? The simplest way to do this is to make the three different plots and combine them.. p1 = Plot[ x, {x, 0,1}] p2 = Plot[ x^2, {x,1,2}] p3 = Plot[ x^3, {x, 2,3}] Show[ p1, p2, p3] It would be quite possible to write a little function which would automate this. Tom Wickham-Jones WRI