No BSD License  

Highlights from
LOGLOGPN

Be the first to rate this file! 8 Downloads (last 30 days) File Size: 2.71 KB File ID: #14606
image thumbnail

LOGLOGPN

by Frederic Moisy

 

11 Apr 2007 (Updated 12 Apr 2007)

LOGLOGPN is the same as LOGLOG, except that the Y data may have positive and negative values

| Watch this File

File Information
Description

LOGLOGPN(...) is the same as LOGLOG(...), except that the Y data may have positive and negative values. This is useful to detect unexpected negative values in the Y data (causing repeated 'Negative data ignored' warnings), or to visualize the magnitude of an oscillating signal in log scale.
 
LOGLOGPN(X,Y) plots X versus Y in log-log scale, where Y may have positive and negative values. By default, negative values are plotted with dashed lines and positive values with full lines. If X is not specified, Y is plotted versus its index.

LOGLOGPN(X,Y,LineSpecPos,LineSpecNeg) specifies LineSpecPos and LineSpecNeg for the line types, marker symbols and colors for the positive and negative values of Y. For instance, LOGLOGPN(X,Y,'ro-','b*') plots the positive Y with red line and 'o' markers and the negative Y with blue stars '*'.
    
LOGLOGPN(X,Y,LineSpecPos,LineSpecNeg,'PropertyName',PropertyValue,...) sets property values for all lineseries graphics objects created by LOGLOGPN. See the line reference page for more information.
 
[HP, HN] = LOGLOGPN(...) returns the handles to the two lineseries graphics objects.

Similarly, SEMILOGYPN(...) works like SEMILOGY(...).
 
Examples:
x = linspace(1,10,200);
y = sin(x*2)./x;
loglogpn(x,y,'r.','bo');
axis([1 10 1e-2 1]);

loglogpn(x,y,'b-','r:','LineWidth',2);
 
[hp, hn] = loglogpn(x,y,'k');
set(hp, 'LineWidth', 1);
set(hp, 'LineWidth', 2);

MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
11 Apr 2007

bug fixes

12 Apr 2007

improvement, more examples.

Tag Activity for this File
Tag Applied By Date/Time
specialized Frederic Moisy 22 Oct 2008 09:08:48
plotting Frederic Moisy 22 Oct 2008 09:08:48
loglog scale plot for positive and negative data Frederic Moisy 22 Oct 2008 09:08:48
loglog scale plot for positive and negative data Sangho 09 Oct 2009 18:12:14

Contact us at files@mathworks.com