Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Plot line with rounded ends
Replies: 8   Last Post: Nov 11, 2012 11:43 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
David

Posts: 3
Registered: 2/7/11
Plot line with rounded ends
Posted: Nov 10, 2012 12:00 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello All,

I am putting together a quick (at-a-glace) style plot for some geochemical data.

plot(0,(METHANE(L(i,:),1)*-1),'linewidth',4,'marker','.','markersize',74,'markerfacecolor','m','markeredgecolor','m');

line([0 0],[0 (METHANE(L(i,:),1)*-1)],'LineStyle','-','LineWidth',24,'marker','.','markersize',74,'color','m');

I am essentially plotting a single point then drawing a line from the origin to the plotted point. A line drawn at width of 24 creates a line with square ends. I would like the line to have rounded ends. 'marker','.' or 'o' does handle this with the marker diameter set to the same width as the line itself, however, on a line of this width it essentially falsing elongates the line since the marker is centered on the data point. The line is then visual lengthed by the amount proportional to the marker radius at each end of the line.

So my question: is there a function or way to create a thick line with rounded ends starting at the original and ending the line at the data point?

Thank you in advance for you help.
Dave



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.