Questions tagged [polar-coordinates]

An alternative form of plotting in mathematical space (other methods include Cartesian and Cylindrical) which utilizes pole-based coordinates (radius,theta) to plot points. Refer to 3D uses as Spherical Coordinates.

This form of graphing establishes an origin at (0,0) and a single axis, or pole, at (∞,0). For example, using this convention, one may plot a point 3 units(radius) from the origin at an angle of 90°(theta) from the pole using (3,90°).

Convert to Cartesian coordinates using (radius×cos(theta), radius×sin(theta)) and vise versa by (sqrt(x2+y2), tan-1(y/x)).

610 questions
40
votes
8 answers

Plot a heart in R

Possible Duplicate: Equation-driven smoothly shaded concentric shapes How could I plot a symmetrical heart in R like I plot a circle (using plotrix) or a rectangle? I'd like code for this so that I could actually do it for my self and to be…
Tyler Rinker
  • 108,132
  • 65
  • 322
  • 519
31
votes
2 answers

R interpolated polar contour plot

I'm attempting to script a contour polar plot in R from interpolated point data. In other words, I have data in polar coordinates with a magnitude value I would like to plot and show interpolated values. I'd like to mass produce plots similar to…
Nate
  • 768
  • 3
  • 9
  • 17
28
votes
1 answer

get point coordinates based on direction and distance (vector)

I need to find the coordinates of the second point. I know the angle between the points in radians and I also know the length of the vector. I would really appreciate if someone could point me towards the solution.
YemSalat
  • 19,986
  • 13
  • 44
  • 51
24
votes
2 answers

Turn off axis border for polar matplotlib plot

I have a polar axes in matplotlib that has text which extends outside of the range of the axes. I would like to remove the border for the axis -- or set it to the color of the background so that the text is more legible. How can I do this? Simply…
aestrivex
  • 5,170
  • 2
  • 27
  • 44
23
votes
2 answers

Half or quarter polar plots in Matplotlib?

I am trying to make a polar plot that goes 180 degrees instead of 360 in Matplotlib similar to http://www.mathworks.com/matlabcentral/fileexchange/27230-half-polar-coordinates-figure-plot-function-halfpolar in MATLAB. Any ideas?
user394430
  • 2,805
  • 2
  • 28
  • 27
19
votes
3 answers

Converting an image from Cartesian to Polar - Limb Darkening

import numpy as np import cv2 from matplotlib import pyplot as plt img = cv2.imread('C:\\Users\\not my user name\\Desktop\\20140505_124500_4096_HMIIC.jpg', 0) norm_image = cv2.normalize(img, dst=None, norm_type=cv2.NORM_MINMAX,…
DankEmperor
  • 373
  • 1
  • 3
  • 8
19
votes
3 answers

Produce a RA vs DEC equatorial coordinates plot with python

I'm trying to generate an equatorial coordinates plot that should look more or less like this one: (The figure is taken from this article, and it shows the position of the Large and Small MCs in equatorial coordinates) Important things to notice…
Gabriel
  • 40,504
  • 73
  • 230
  • 404
16
votes
3 answers

Clockwise polar plot with 0 deg at the top

How can I make a clockwise polar plot? Somebody ask a similar question here: How to make the angles in a matplotlib polar plot go clockwise with 0° at the top?, But I don't understand this: import matplotlib.pyplot as plt import numpy as np fig =…
kame
  • 20,848
  • 33
  • 104
  • 159
15
votes
4 answers

Fixing the Radial Axis on MATLAB Polar Plots

I'm using polar plots (POLAR(THETA,RHO)) in MATLAB. Is there an easy way to fix the range for the radial axis to say, 1.5? I'm looking for something analogous to the xlim, ylim commands for cartesian axes. Haven't found anything in the docs yet.
Adam Holmberg
  • 7,245
  • 3
  • 30
  • 53
14
votes
1 answer

How to draw rounded line ends using matplotlib

Say I am plotting a complex value like this: a=-0.49+1j*1.14 plt.polar([0,angle(x)],[0,abs(x)],linewidth=5) Giving Is there a setting I can use to get rounded line ends, like the red line in the following example (drawn in paint)?
Lee
  • 29,398
  • 28
  • 117
  • 170
13
votes
1 answer

How do I curve text in a polar plot?

Hello Matplotlib Experts, How do I curve text in a matplotlib polar plot? In my attempt below, my code rotates each char individually, but doing so would remove the natural spacing of each font. Can somebody describe a solution for passing ax.text…
user1462442
  • 7,672
  • 1
  • 24
  • 27
13
votes
2 answers

Move radial tick labels on a polar plot in matplotlib

From matplotlib examples: import numpy as np import seaborn as sbs import matplotlib.pyplot as plt r = np.arange(0, 3.0, 0.01) theta = 2 * np.pi * r ax = plt.subplot(111, polar=True) ax.plot(theta, r, color='r',…
alkamid
  • 6,970
  • 4
  • 28
  • 39
13
votes
1 answer

Matplotlib - Drawing a smooth circle in a polar plot

I really like the polar plot of matplotlib and would love to keep working with it (since my data points are given in polar coordinates anyway and my environment is circular). However, in the plot, I would like to add circles of given radii at…
limbonic
  • 279
  • 1
  • 3
  • 11
12
votes
1 answer

Spiral barplot using ggplot & coord_polar (Condegram)

I'd like to create a bar plot on an Archimedean spiral, like discussed here. With an end goal of something like this, but less overwhelming. Here's a sample dataframe: test <- structure(list(month = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, …
jesstme
  • 604
  • 2
  • 10
  • 25
12
votes
1 answer

Polar heatmaps in python

I want to plot a paraboloid f(r) = r**2 as a 2D polar heatmap. The output I expect is The code that I have written is from pylab import* from mpl_toolkits.mplot3d import Axes3D ax =…
kanayamalakar
  • 564
  • 1
  • 11
  • 27
1
2 3
40 41