File Exchange

image thumbnail

prettyplot

version 1.0 (2.14 KB) by

Prettier line plots with markers.

4 Downloads

Updated

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.

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');

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