Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8700455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:10:22+00:00 2026-06-13T02:10:22+00:00

I want to plot some values representing visible satellites into a polar graph with

  • 0

I want to plot some values representing visible satellites into a polar graph with Python and matplotlib. I have written some code following a matplotlib example, and the polar chart is represented, but given points are not plotted:

import matplotlib
from matplotlib.pyplot import figure, show, rc, grid
from math import pi

# radar green, solid grid lines
rc('grid', color='#316931', linewidth=1, linestyle='-')
rc('xtick', labelsize=15)
rc('ytick', labelsize=15)

# force square figure and square axes looks better for polar, IMO
width, height = matplotlib.rcParams['figure.figsize']
size = min(width, height)
# make a square figure
fig = figure(figsize=(size, size))
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#d5de9c')

# Satellite info [PRN, E, Az, Ss, Used (1 yes, 0 no)]
sat = [ [1, 62, 255, 46, 1],
        [14, 62, 26, 46, 1],
        [31, 42, 158, 36, 1],
        [22, 40, 76, 50, 1],
        [11, 29, 308, 0, 0],
        [19, 26, 243, 36, 1],
        [3, 13, 217, 0, 0],
        [18, 10, 93, 0, 0],
        [20, 6, 291, 0, 0],
        [5, 1, 72, 0, 0],
        [122, 43, 216, 0, 0],
        [135, 47, 203, 43, 0] ]

for index in (0, len(sat)-1):
    if(sat[index][4]>0):
        ax.plot(sat[index][2], sat[index][1], color='green', marker='s', markersize=12)
    else:
        ax.plot(sat[index][2], sat[index][1], color='gray', marker='s', markersize=12)

ax.set_rmax(2.0)
grid(True)

ax.set_title("Visible satellites", fontsize=20)
show()

What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:10:24+00:00Added an answer on June 13, 2026 at 2:10 am

    Its simpler to just iterate of your list of sats like this:

    for s in sat:
        if(s[4]>0):
            ax.plot(s[2], s[1],color='green', marker='s', markersize=5)
        else:
            ax.plot(s[2], s[1],color='gray', marker='s', markersize=5)
    

    In addition to that, you’re also limiting the azimuth to <2 with the set_rmax, this leaves only 1 satellite visible, uncomment it to see all of them.

    edit:
    Directly unpacking the list might further improve the readability:

    for (PRN, E, Az, Ss, Used) in sat:
        if(Used>0):
            ax.plot(Ss, Az,color='green', marker='s', markersize=5)
        else:
            ax.plot(Ss, Az,color='gray', marker='s', markersize=5)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some data that I want to display as a box plot using
I have the data in two files. I want to plot a graph the
With this approach. I have a line plot graph. I want to plot 'two'
I want to plot some data. The first column contains the x-data. But matplotlib
I'm trying do define an interface in which I want to plot some values
I want to plot a graph with different colors based on values. I wrote
I'm currently rewriting some python code to make it more efficient and I have
I want to plot multiple rowstacked histograms on the same graph using gnuplot. A
I have a data which I want to plot in cumulative function. The R
I have a program which accesses some functions in another class. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.