The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ]

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.


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.

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.