Background image polar plot

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

Réponses (1)

Gopeshh Raaj
Gopeshh Raaj le 23 Juin 2017

0 votes

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 commentaires

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 le 13 Avr 2018
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

Connectez-vous pour commenter.

Catégories

En savoir plus sur Polar Plots dans Centre d'aide et File Exchange

Question posée :

le 20 Juin 2017

Commenté :

le 13 Avr 2018

Community Treasure Hunt

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

Start Hunting!

Translated by