Code covered by the BSD License  

Highlights from
Shade Anomaly

5.0

5.0 | 1 rating Rate this file 14 Downloads (last 30 days) File Size: 2.43 KB File ID: #27216
image thumbnail

Shade Anomaly

by Alec

 

09 Apr 2010 (Updated 14 Apr 2010)

The fills in graphs above and below the x-axis different colors.

| Watch this File

File Information
Description

Shade Anomaly fills in graphs above and below the x-axis different colors. It allows you to create offsets, so that values above a certain threshold are shaded. This is good to use if you would like shade values above a standard deviation.

There is an example in the script if you do not enter any inputs.

Please share comments and suggestions!

MATLAB release MATLAB 7.8 (R2009a)
Other requirements This function requires the use of the hline function. You can download it from the File Exchange or you can comment out that part of the function.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
12 Apr 2010 Alec

The function does not deal well with NaNs (it will not shade). One can add the following simple lines just above the TOP section to remove NaNs.
x=x(~isnan(y));
y=y(~isnan(y));

14 Apr 2010 Alec

The function requires the use of a function called hline. You can download it from the file exchange or you can comment out that line. It is for appearance only. A new version will include those changes in the near future.

08 Mar 2012 Deborah  
08 Mar 2012 Deborah

Great work, and it's exactly what I was looking for! Thank you

Please login to add a comment or rating.
Updates
14 Apr 2010

Added the requirement of a function called within the shade_anomaly function.

Tag Activity for this File
Tag Applied By Date/Time
fill Alec 12 Apr 2010 11:00:35
area Alec 12 Apr 2010 11:00:35
plot Alec 12 Apr 2010 11:00:36
shade Alec 12 Apr 2010 11:00:36
anomaly Kent 14 Apr 2010 16:06:45
area Kent 14 Apr 2010 16:06:51
shade Martin Richard 16 Apr 2010 07:24:56
fill Martin Richard 16 Apr 2010 07:25:04
plot Martin Richard 16 Apr 2010 07:25:05
anomaly Alec 05 May 2010 14:46:07

Contact us at files@mathworks.com