Code covered by the BSD License  

Highlights from
prettyplot

5.0

5.0 | 3 ratings Rate this file 15 Downloads (last 30 days) File Size: 2.14 KB File ID: #27237
image thumbnail

prettyplot

by

 

Prettier line plots with markers.

| Watch this File

File Information
Description

PRETTYPLOT works just like PLOT, but avoids the line and markers being on top of each other. Instead, the line joins the markers without touching them.

Example
   figure('position',[200,200,800,600])
   hold on
   set(gca,'xlim',[-3.2,3.2],'ylim',[-3,3])
   x = -pi:pi/10:pi;
   y = tan(sin(x)) - sin(tan(x));
   h = prettyplot(x,y,'-+b',x,2*cos(x),'-xr','LineWidth',2,'MarkerSize',8);
   h = [h;prettyplot(x,randn(size(x)),'-o','LineWidth',1,'MarkerSize',6,'color',[0,0.8,0])];
   legend(h(1:2:end),'demo','cos','randn');

MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
28 Feb 2011 Husam Aldahiyat

Great function!

18 Jun 2010 Gustaf Kylberg

I was looking for an alternative to the Matlab function plot to solve this specific problem with lines on top of markers, so thank you! Funny that I found your function via Matlab Fileexchange when you have written the function "inhouse" =)

18 Jun 2010 Gustaf Kylberg  
30 Apr 2010 Joao Henriques  

Contact us