624 questions
1
vote
1
answer
123
views
Matplotlib - polar projection ax, issue with set_theta_zero_location and the grid
My matplotlib version is 3.7.2,
here is my code:
import matplotlib.pyplot as plt
fig, ax = plt.subplots(subplot_kw={'projection': 'polar'})
ax.set_theta_zero_location('N', offset=int(28))
ax.grid(...
2
votes
1
answer
63
views
Generating a discrete polar surface map in cartesian coordinates
I would like to generate a surface plot with discrete arc-shaped cells on a 2D cartesian plane. I am able to get decent results by plotting a 3D surface plot (using plot_surface) and viewing it from ...
2
votes
1
answer
58
views
Remove whitespace between axis.line and panel.border in geom_radial with R ggplot2
I am trying to create a simple radial/polar plot in R ggplot2 using coord_radial(), which is similar to coord_polar but with more options. Below is an example plot with data:
library(ggplot2)
...
1
vote
1
answer
113
views
How do I rotate sprites by using polar coordinates in Godot 4.3?
I am aware that functions such as look_at() and rotate() are available.
I am doing a little experiment on Godot where I'm attempting to rotate my character's arm towards the cursor, by transforming ...
1
vote
1
answer
66
views
How to extract the coodinate origin in `coord_radial()`
I want to align two circular plot in ggplot2 (draw_ggcircle_list), but I cannot extract the coordinate origin (0, 0) of the coord_radial(). Now following two plots won't aligned by the x-axis (theta-...
1
vote
2
answers
69
views
Matplotlib polar chart not showing all xy-ticks
Issue 1: The x-ticks (pie pieces) aren't ordered from 0 to 24 (my bad, should be 1)
Issue 2: all y-ticks (rings) aren't showing
Issue 3: Someone seems to have eaten a part of the polar chart ...
I ...
0
votes
2
answers
62
views
MATLAB - Coloring the area bounded by two curves in polar coordinate system
I'm new to Matlab and I'm trying to write a code that draws these two curves in polar coordinate system and colors the area bounded by them.
r1 = 3 * sin(theta)
r2 = 1 + sin(theta)
I've tried several ...
0
votes
1
answer
55
views
Pan contours in a polar coordinate ggplot2 image?
Question
I have some polar coordinate contours fitted with GAM in R and I plotted the contours and their CIs with ggplot2.
Now I want to horizontally move the whole contours since the left part of my ...
2
votes
1
answer
78
views
R coord_polar removes one segment
I try to build a radial plot with a segment that goes from just below 2*pi up to just above 2*pi. However, this segment is removed with the warning
Warning message:
Removed 1 row containing missing ...
1
vote
0
answers
78
views
3D cylindrical polar plot in python (beamforming per different frequencies)
Is it possible to make this figure in Matplotlib or any other libraries in Python?
The top figure can be easily achieved with plt.polar in mattplo, but how about the bottom one? Would Tikz be more ...
0
votes
2
answers
77
views
How do I move the cartesian subfigure axes I added to a polar plot closer together?
I've managed to successfully make a figure with three polar plots and have added cartesian axes. The problem I have is that the final figure has a lot of whitespace in between the axes, which I would ...
3
votes
2
answers
279
views
real and imaginary part of a complex number in polar form
I am a bit confused about the proper way to deal with complex numbers in polar form and the way to separate its real and imaginary part.
Notice that I am expecting as real part the radius, as ...
0
votes
1
answer
74
views
Center bin of polar plot at midpoint without losing bin in ggplot2
I am attempting to create a plot based on frequency at each cardinal direction. I followed the instructions from this excellent resource but I am running into a major issue when attempting to centre ...
0
votes
2
answers
162
views
How to use mouse left button drag to pan on matplotlib's polar coordinate axis
it looks like the pan feature works badly on the polar axis. It does not pan the plot when I drag the left mouse button. See the image shot below:
The pan feature works OK on a matplotlib's Cartesian ...
0
votes
2
answers
122
views
Draw geom_segment that crosses zero in ggplot2 coord_polar
I am modifying this tutorial to create a circular calendar of a year. I am trying to subdivide the calendar into seasons, but because the geom_segment for winter crosses zero degrees on my polar plot, ...
0
votes
2
answers
88
views
Overlay a polar matplotlib axis over a geopandas map
I would like to overlay a polar axis over a map of a GeoPandas GeoDataFrame centered at a specific point. The ultimate goal is for the plot on the polar axis to be exactly centered at the point. I ...
0
votes
1
answer
83
views
Geom_Line not connecting in Coord_Polar after adding Geom_Bar in R
I am looking to plot a geom_line and geom_bar as circular data in R, using the coord_polar line in ggplot. Currently, when I add geom_bar to the geom_line, the geom_line no longer connects to itself. ...
0
votes
1
answer
165
views
How to plot x,y,z data in a polar stereographic map in matlab?
I have data from the SAR satellite instrument that is already in a polar stereographic projection. The data comes with x,y coordinates, not lat,lon. Can anyone provide insight on how to plot the z ...
0
votes
0
answers
60
views
Generating polar lot with specific gridlines with rectangular appearance with matplotlib
I want to generate a similar plot like this Right now, I want to generate an emplty polar plot with the exact grid lines as in the image and with angle ticks like this one: . How to generate the grid ...
3
votes
1
answer
162
views
Autoencoders and Polar Coordinates
Can an autoencoder learn the transformation into polar coordinates? If a set of 2D data lies approximately on a circle, there is a lower-dimensional manifold, parameterized by the angle, that ...
2
votes
1
answer
63
views
Labeling/positioning of grouped, stacked, circular barchart in R
I am trying to create a circular, stacked, and grouped bar chart using ggplot2. The problems I am having are
adjustment of prop labels within the chart itself. The labels positioning within the bars (...
0
votes
1
answer
299
views
How to create a circular grouped and stacked bar chart in R
Trying to create a circular stacked bar chart, like this one: https://r-graph-gallery.com/299-circular-stacked-barplot.html . But that also includes subgroups. I'm unable to create a chart that is ...
2
votes
1
answer
90
views
How do I add a website image to a facet-wrap barplot with polar coordinates?
I have created a circular (polar) barplot with facets and would like to place headshots of two baseball players in the center of each plot. I have tried several methods including annotation_custom (...
0
votes
1
answer
88
views
Polar color mesh from 1d arrays
I have three arrays
theta
array([180., 180., 180., 180., 180., 180., 180., 180., 180., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 225., 225., 225.,
225., 225., 225., ...
0
votes
1
answer
195
views
Ensuring consistent formatting across plotly express bar polar subplots
I would like to create subplots of plotly express barpolar plots whereby the layout specifications are the same for each plot.
I have taken a solution found in this thread to build the barpolar ...
1
vote
0
answers
57
views
Error in plotting coastlines in magnetic co-ordinates
SO I was trying to plot coastlines in both geographical and geomagnetic co-ordinates. I took the latitude and longitude values of the geographical co-ordinate system, and converted the co-ordinates to ...
0
votes
2
answers
213
views
Javascript Geometry: Polar to Cartesian and Back Again
I'm trying to create a program that converts Polar values to Cartesian and back again. I need to be able to switch between the two types without any change in the data.
I've created class types for ...
1
vote
0
answers
64
views
Plotting concentration constant over theta over an annulus in matplotlib not working as expected?
First-time poster, so apologies if the format or etiquette are not quite right.
I have been working on a code in a Jupyter Notebook that uses an Euler-explicit method to calculate simple unsteady ...
0
votes
1
answer
317
views
Radial text annotation polar plot with clockwise direction
I want to place some text on a radius of a polar plot. When using the default theta zero location and direction it works as expected
fig = plt.figure(figsize=(6,6))
ax = fig.add_subplot(111, polar=...
-1
votes
4
answers
571
views
polar animation
I have this task: create a heart animation using polar coordinates. Start from drawing a heart and then add animation as the next step; use variable increase of the rendering angle.
Then i need to ...
1
vote
2
answers
638
views
Annotation in a plotly polar plot
I'm trying to add annotations arrows to a plotly polar plot, but that produces another underlying cartesian plot:
Question 1: is there a way to add annotation to polar plots? This page of 2019 ...
1
vote
1
answer
289
views
how to convert Cartesian coordinates to polar with certain origin?
cart2polar assumes 0 ,0 origin; I need to know how to change it.
My origin is the x and y
y <- 0.23
x <- 81.05
cart2polar <- function(x, y) {
data.frame(theta = sqrt(x^2 + y^2), r = ...
1
vote
1
answer
204
views
grid line labeling (labels around the map's border) for a South Polar Stereo projection
I'm using the South Polar Stereographic projection to create a map of Antarctica. I've been able to create the gridlines using Cartopy, but the labels for the gridlines are not circular around the map,...
2
votes
1
answer
3k
views
Shade the intersection area between 2 curves in Latex
I'm having to draw a polar graph and shade the area between the line (theta = pi/8) (blue line) and the curve (r = 4 * sqrt(2) * cos(2*theta) (red curve).
Figure
My current Latex (the area hasn't been ...
0
votes
1
answer
258
views
Plot polar grid above 2D-FFT plot in Python Matplotlib
I have created a 2D FFT plot using numpy np.fft.fft2 and now I would like to plot a polar grid in this 2D FFT like this image Plot and Plot with polar grid.
I have tried something like:
import numpy ...
0
votes
0
answers
49
views
On a polar plot (using matplotlib) can a new point use a previous point as the centre of origin?
I've been modeling a double pendulum (here is a good example https://web.mit.edu/jorloff/www/chaosTalk/double-pendulum/double-pendulum-en.html) in python and I have got to the stage of refining my ...
0
votes
0
answers
45
views
How to affect column label positions on a polar chart when grouping is enabled?
I tried suggestions from the Chat about how to affect the column labels on a polar chart (distance, align, x and y) but nothing seems to work, they never move, they aren't centered, they aren't ...
1
vote
1
answer
105
views
Some R functions (e.g. annotate()) do not work with coord_radar. Is there a workaround?
I am using the following script to create a multitude of radar plots for analysis. I want to add some sized arrows and a circle in the middle of the radar plot. annotate() and geom_rect() do, maybe ...
1
vote
2
answers
440
views
How to generate random coordinates outside the circle contained in a rectangular region?
Given:
Rectangular region with length l & breadth b
Circle with radius r
Circle is contained in rectangular region like shown in below image
See image here - Red are expecting evenly ...
0
votes
0
answers
38
views
Why is this program for converting cartesian coordinates to Polar coordinates is not giving correct omega value? [duplicate]
This is my program in C:
#include<stdio.h>
#include<math.h>
int main()
{ int x, y;
printf("Enter the cartesian coordinates to be converted into respective polar ...
1
vote
1
answer
64
views
Closing line in polar plot between 350 and 10 degrees
I have data on frequency of damaged and healthy forest in 20-degree aspect classes (slope direction). The midpoints of the classes, which I want to use for plotting, start at 10 deg and go up to 350. ...
0
votes
1
answer
512
views
Environmental variable data extraction, lat-lon to polar stereographic projection conversion?
I'm trying to extract monthly composite sea ice concentration from the regions of the Southern Ocean in this figure:
I've found the data that I want here. The issue is that the coordinates for those ...
0
votes
0
answers
348
views
How to smoothly interpolate and fill in edge detected closed shapes?
I'm working on segmentation of plant epithelial cells. My goal is to isolate cells from microCT scans and then run various metric analyses on them. Right now I am able to segment and edge detect these ...
3
votes
2
answers
377
views
How to make a map of 1/2 of Antarctica
I'm trying to make a map figure of half of Antarctica. I need to plot the western half (the Ross Sea half), from 120ºE to 60ºW.
I've used reference code from a similar question to make the following ...
1
vote
1
answer
973
views
Plotting polar function using matplotlib
I'm trying to plot this function using matplotlib.
As you can see in the Desmos app, the equation correctly plot the function as circle, but when I try to port it to Python, I got this instead:
...
1
vote
0
answers
391
views
Plotting Polar Plots with logarithmic R-Scale using matplotlib
I need to plot antenna radiation pattern. For this i need a logarithmic polar plot.
The Problem is, that matplotlib doesn't support the log polar plot properly.
The data for the radiation pattern is ...
0
votes
1
answer
256
views
Change grid lines interval in mplstereonet
Everytime I plot stereograms using grid, the grid lines are spaced for every 30 degrees (like below). Is there a way to set grid lines every 10 degrees? I'm using mplstereonet´
It used to be every 10 ...
1
vote
0
answers
271
views
How to implement inverse log-polar transform in tensorflow
I implement the log-polar transform and its inversion. The forward transform is ok but the inversion picture shows the incorrect result. I think the issue is on the normalization of the grid ...
4
votes
1
answer
752
views
Bar polar with areas proportional to values
Based on this question I have the plot below.
The issue is plotly misaligns the proportion between plot area and data value. I mean, higher values (e.g. going from 0.5 to 0.6) lead to a large increase ...
1
vote
1
answer
88
views
Barplot based on coloured sectors
I am creating a bar plot where the colour of the bar is proportional to the value. However, is it possible to break down the bar into colour sectors? See below what I have and what I mean:
import ...