Site hosted by Angelfire.com: Build your free website today!

plotxx

PURPOSE ^

PLOTXX - Create graphs with x axes on both top and bottom, (X1,Y1) & (X2,Y2)

SYNOPSIS ^

function [ax,hl1,hl2] = plotxx(x1,y1,x2,y2,xlabels,ylabels);

DESCRIPTION ^

PLOTXX - Create graphs with x axes on both top and bottom, (X1,Y1) & (X2,Y2) 

Similar to PLOTYY, but ...
the independent variable is on the y-axis, 
and both dependent variables are on the x-axis.

Syntax: [ax,hl1,hl2] = plotxx(x1,y1,x2,y2,xlabels,ylabels);

Inputs:  X1,Y1 are the data for the first line (black)
         X2,Y2 are the data for the second line (red)
         XLABELS is a cell array containing the two x-labels
         YLABELS is a cell array containing the two y-labels

The optional output handle graphics objects AX,HL1,HL2
allow the user to easily change the properties of the plot.

Example: Plot temperature T and salinity S 
         as a function of depth D in the ocean

D = linspace(-100,0,50);
S = linspace(34,32,50);
T = 10*exp(D/40);
xlabels{1} = 'Temperature (C)';
xlabels{2} = 'Salinity';
ylabels{1} = 'Depth(m)';
ylabels{2} = 'Depth(m)';
[ax,hlT,hlS] = plotxx(T,D,S,D,xlabels,ylabels);

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^


Generated on Sat 12-Mar-2005 01:01:49 by Rezaul Karim © 2004