File Exchange

image thumbnail


version 1.0 (2.14 KB) by

Prettier line plots with markers.



View License

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.

   hold on
   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])];

Comments and Ratings (4)

Husam Aldahiyat

Great function!

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" =)

Joao Henriques

MATLAB Release
MATLAB 7.9 (R2009b)
Tags Add Tags

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video