Add line(s) to 2D plots with specified colors

Version 1.0.0.0 (1.75 KB) by Semi
ADDLINE_Z adds solid color line(s) in the axes of 2D plot
374 Downloads
Updated 8 Sep 2010

View License

% ADDLINE_Z adds solid color line(s) in the axes passed by handle h_ax
% both 'value' and 'color' can be an array
% 'color' is set to 'k' if not given
%
% Syntax:
% addline_z(h_ax,xy,value,color); %% tested on MATLAB 7.9.0 (R2009b)
% e.g.:
% figure;
% x=[0:0.01:10];
% y=sin(x);
% plot(x,y);
% addline_z(get(gcf,'Children'),'y',[0.2,0.5,0.8],{'r','g','b'});
%
% Description:
% Too simple to be stated here.
%
% Programmed and Copyright by J. Zhang: xyzhangj@physics.ucla.edu
% $Version=0.1 $Date=2010/09/07

Cite As

Semi (2024). Add line(s) to 2D plots with specified colors (https://www.mathworks.com/matlabcentral/fileexchange/28668-add-line-s-to-2d-plots-with-specified-colors), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0