Hello,
I am displaying data using polarscatter, but I would like to add a background image on which the data is displayed including the polar axes. My image is still a normal carthesian image and I would think I would somehow have to convert this to a round polar image before my polarscatter plot can be added.
Any help would be extremely useful. Thanks in advance!
Regards, Luuk

답변 (1개)

Gopeshh Raaj
Gopeshh Raaj 2017년 6월 23일

0 개 추천

I understand that you want to plot some data using polarscatter and you wish to include a polar background image (after conversion from cartesian image).
In order to convert your Cartesian image to polar, you would first need to get the (x,y) co-ordinates of the cartesian image and then convert it to the (r,theta) form using "cart2pol" function. Then this image can be used as your background image for your scatter plot using the "imagesc" function.

댓글 수: 3

Thank you for your answer Gopeshh.
When I use cart2pol, my image deforms, which I do not want. The cartesian shows me the image I want to see, but I cant plot this as a background image as it doesn't have polar coordinates. I just want the edges of my image to be cut of and then use the image as a background.
As an example, I want a plot with a background image such as this ( source ):
But then I want to plot something on polar axes. When I use following most simple illustrative code for example:
img = imread('Figures/testimage.jpeg');
imagesc(img)
polaraxes;
theta = 0:1:360; r = theta/10;
theta = 0:10:360; r = theta/10;
polarscatter(deg2rad(theta),r)
I get an image such as this. So now I want the edges to be cut off and set it as a background for the polar axes.
Hi Luuk, I have exactly the same problem. Did you find a solution?
thanks a lot in advance and kind regards, José
Luuk Poort
Luuk Poort 2018년 4월 13일
Hello José, I'm afraid I have not. I continued without using it. If you do find a solution, please let me know, I'm still very curious on how to do it.
Kind regards, Luuk

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Polar Plots에 대해 자세히 알아보기

질문:

2017년 6월 20일

댓글:

2018년 4월 13일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by