Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Problem in display of matlab chart

Subject: Problem in display of matlab chart

From: Toan Cao

Date: 3 Mar, 2011 01:43:20

Message: 1 of 2

Hello everyone,

I face a problem in displaying the chart in Matlab. I hope everyone will guide me to overcome it!
I have a binary image with vertical lines : http://i55.tinypic.com/316k96s.jpg
I draw the number of pixels of image in chart, where X axis is pixel position in horizontal direction and Y axis is the number of pixels in vertical direction. Because the width of vertical lines in binary image is one pixel, so i think i have vertical lines of one pixel width in my chart. However, Matlab doesn't display as i think: http://i53.tinypic.com/241o935.jpg
 How can i correct to make it in desired result?

Thanks in advance,
Toan

Subject: Problem in display of matlab chart

From: ImageAnalyst

Date: 3 Mar, 2011 02:14:19

Message: 2 of 2

On Mar 2, 8:43 pm, "Toan Cao" <toancv3...@gmail.com> wrote:
> Hello everyone,
>
> I face a problem in displaying the chart in Matlab. I hope everyone will guide me to overcome it!
> I have a binary image with vertical lines :http://i55.tinypic.com/316k96s.jpg
> I draw the number of pixels of image in chart, where X axis  is pixel position in horizontal direction and Y axis is the number of pixels in vertical direction. Because the   width of vertical lines in binary image is one pixel, so i think i have vertical lines of one pixel width in my chart. However, Matlab doesn't display as i think:http://i53.tinypic.com/241o935.jpg
>  How can i correct to make it in desired result?
>
> Thanks in advance,
> Toan

----------------------------------------------------------
You forgot to post the code that you used to generate the "MATLAB
chart." It doesn't look like imshow(). Was it plot()???? If it's
plot of a single line profile, then when it goes from the peak to the
next pixel, that will have to be a slanted line, so the line will look
like what you have. That does not mean the data is like that - it's
just the usual jaggies you get when you draw slanted lines and
curves. To avoid that you can use bar() instead of plot().

See http://en.wikipedia.org/wiki/Jaggies

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us