%% Plot Multiple Implicit Equations
% You can plot multiple equations either by passing the inputs as a vector or by using hold on to successively plot on the same figure. If you specify LineSpec and Name-Value arguments, they apply to all lines. To set options for individual plots, use the function handles returned by fimplicit.
% Divide a figure into two subplots by using subplot. On the first subplot, plot x^2 + y^2 == 1 and x^2 + y^2 == 3 using vector input. On the second subplot, plot the same inputs by using hold on.

syms x y
circle1 = x^2 + y^2 == 1;
circle2 = x^2 + y^2 == 3;

subplot(2,1,1)
fimplicit([circle1 circle2])
title('Multiple Equations Using Vector Input')

subplot(2,1,2)
fimplicit(circle1)
hold on
fimplicit(circle2)
title('Multiple Equations Using hold on Command')

hold off

% Copyright 2012 The MathWorks, Inc.