4.75

4.8 | 4 ratings Rate this file 61 downloads (last 30 days) File Size: 1.94 KB File ID: #7255

AREASHADE

by Andreas

 

24 Mar 2005 (Updated 25 Mar 2005)

BSD License  

Shades areas between a curve and a fixed threshold.

Editor's Notes:

This file was a File Exchange Pick of the Week

Download Now | Watch this File

File Information
Description

AREASHADE(X,Y,F) shades the area where Y is larger than some fixed value F using the color yellow.  
   
AREASHADE(X,Y,F,C) uses color C instead of yellow.  
   
AREASHADE(X,Y,F,C,TH) where TH = 'h' uses F as a high threshold and shades the are where Y<F. Default for TH is 'l', painting Y>F.  
   
H = AREASHADE(X,Y,F) returns a handle to the created patch.  
   
Example:  
  x = [0:.5:20]; y = sin(x);  
  figure, plot(x,y,'o-'), hold on  
  areashade(x,y,1/sqrt(2),'r')  
  areashade(x,y,-1/sqrt(2),'b','h');  
  plot(xlim,1/sqrt(2)*[1 1],'k')  
  plot(xlim,-1/sqrt(2)*[1 1],'k')

MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
20 Dec 2005 eric campos e estado buscando la forma de encontrar el area de una grafica yo tambien y encontre la tuya y la voy a estudiar
18 Jan 2006 ff frfr  
02 May 2007 Ajaya Mohan Excellent, solved my long standing problem.
07 Jan 2009 Jagadeesh WoW, this is really superb.And, Andreas have you ever tried transparent plot i.e the plot which is behind is overlapped with the plot at the front and should be visible to the user
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
specialized Andreas 22 Oct 2008 07:44:09
plotting Andreas 22 Oct 2008 07:44:09
patch custom plot Andreas 22 Oct 2008 07:44:09
graphics Gautam Vallabha 17 Jun 2009 11:11:06
shading Gautam Vallabha 17 Jun 2009 11:11:06

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com