Python Forum
Problem with contourf plot and polar projection
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with contourf plot and polar projection
#1
Hi,
I have a Problem drawing a plot with ploar coordinates.
I have the data in three columns (x,y and intensity). In cartesian coordinates, the data look as they should, but as soon I change the projection to ploar Things go weird (see Images).
I produced a meshgrid for the data and used a contourf plot. But also the tricontourf plot Looks the same.
    chi, phi, intensity = np.genfromtxt(f, unpack=True, skip_header = 5)
    intensity = intensity / max(intensity)
    chi_new = np.linspace(0, 85, 50)
    phi_new = np.linspace(0, 360, 50)
    
    chi_dense, phi_dense = np.meshgrid(chi_new, phi_new)
    grid = np.meshgrid(chi_new, phi_new)

    int_new = griddata(np.array([chi, phi]).T, intensity, (chi_dense, phi_dense), method='cubic')
    
    fig = plt.figure()
    ax = fig.add_subplot(1, 2, 1, projection='polar')
    ax.contourf(phi_dense, chi_dense, int_new, levels = np.linspace(0,1,50))
I think the Problem could be the connection between the data Points (see contour plot)

İmage


Anyone a glue what the Problem is About?

PS: How can I attach an Image of the figures or add the raw data?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to plot intraday data of several days in one plot mistermister 3 2,892 Dec-15-2020, 07:43 PM
Last Post: deanhystad
  Ploting polar chart with circumference as Zero ibaad1406 0 1,222 Feb-10-2020, 05:53 PM
Last Post: ibaad1406
  Plot multiple csv into one graph problem with visualize linkxxx86 1 5,707 Oct-14-2019, 05:54 PM
Last Post: linkxxx86
  How to plot vertically stacked plot with same x-axis and SriMekala 0 1,914 Jun-12-2019, 03:31 PM
Last Post: SriMekala

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020