Code covered by the BSD License  

Highlights from
prettyplot

5.0

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

prettyplot

by Cris Luengo

 

13 Apr 2010

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 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
30 Apr 2010 Joao Henriques  
18 Jun 2010 Gustaf Kylberg  
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" =)

28 Feb 2011 Husam Aldahiyat

Great function!

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
plot Cris Luengo 13 Apr 2010 09:22:47
graph Cris Luengo 13 Apr 2010 09:22:47
line Cris Luengo 13 Apr 2010 09:22:47
marker Cris Luengo 13 Apr 2010 09:22:47

Contact us at files@mathworks.com