Code covered by the BSD License  

Highlights from
AREASHADE

4.75

4.8 | 4 ratings Rate this file 3 Downloads (last 30 days) File Size: 1.85 KB File ID: #7255
image thumbnail

AREASHADE

by Andreas

 

24 Mar 2005 (Updated 25 Mar 2005)

Shades areas between a curve and a fixed threshold.

Editor's Notes:

This file was a File Exchange Pick of the Week

| 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 (5)
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

02 Jul 2011 Venkateswara Rao Narukull

An excellent work indeed

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

Contact us at files@mathworks.com