matlab - Plotting with transparency -


I have to plot two forms below which overlap each other. How can I make the overlapping area transparent, so that the lower curve is visible? In the overlapping area, I can currently only see the top curve.

  x = 0: 0.01: 2 * pi; % # Starting x array y1 = sin (x); % # Create the first curve y2 = sin (x) + 5 % # Make another curve X = [X, flipple (x)]; To create plot% # create creative x value array = [or 1, flipple (y2)]; Make y value for # # outside and then fill back (X, Y, 'B'); % # Plot area% *************************************************************************************************** *****************% # Initial x array y1 = sin (2. * x); % # Create the first curve y2 = sin (2. * x) + 5 % # Make another curve X = [X, flipple (x)]; To create plot% # create creative x value array = [or 1, flipple (y2)]; Make y value for # # outside and then fill back (X, Y, 'B'); % # Plot filled area  

Change your last order Fill (X, Y, 'B'); with :

  h = fill (x, y, 'b');   

To retain the patch object to get it. Then type:

  set (h, 'face alpha', 0.5)   

 Enter image details here

Is this what you need?

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

c# - Call function from DLL -