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:
How to get datacursor on center of the pcolor plot'squares?

Subject: How to get datacursor on center of the pcolor plot'squares?

From: Camille Couzi

Date: 15 Feb, 2011 17:57:04

Message: 1 of 2

Hi!
i am working on plots with pcolor. I am plotting a matrix M. I need to get the position information with datacursor, but I have a problem, with pcolor, the cross of the matrix don't draw in the center of each little square of the pcolor plot (as imagesc do), instead of that, it goes on the knots, so it is impossible to get the nº of row and columns of my matrix M when I put the datacursor on the pcolor plot...

I can't work with imagesc as I am making circular contour plots, so I define x and y matrices wchich contains meshgrids of rho and theta values. (imagesc only accepts column or row vectors).

I would be very thankfull if somebody can help me...
thanks!

Camille.

Subject: How to get datacursor on center of the pcolor plot'squares?

From: Tristan

Date: 21 Nov, 2011 12:49:08

Message: 2 of 2

Any solution on this yet?
I need the axis ticks centerd on the fields also, and a simple shift is out of question as the fileds are not all the same size..
Thanks for any help,
Tristan

"Camille Couzi" <camillecouzi@yahoo.fr> wrote in message <ijeepg$809$1@fred.mathworks.com>...
> Hi!
> i am working on plots with pcolor. I am plotting a matrix M. I need to get the position information with datacursor, but I have a problem, with pcolor, the cross of the matrix don't draw in the center of each little square of the pcolor plot (as imagesc do), instead of that, it goes on the knots, so it is impossible to get the nº of row and columns of my matrix M when I put the datacursor on the pcolor plot...
>
> I can't work with imagesc as I am making circular contour plots, so I define x and y matrices wchich contains meshgrids of rho and theta values. (imagesc only accepts column or row vectors).
>
> I would be very thankfull if somebody can help me...
> thanks!
>
> Camille.

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