Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add marker and markersize keywords to plot_radar_position() #405

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

billetd
Copy link
Contributor

@billetd billetd commented Oct 9, 2024

Scope

This PR simply adds marker and markersize keywords to plot_radar_position() so that the markers themselves can be controlled. Right now that is just control of their size and shape. Shapes are based on those available to ax.scatter() (see matplotlib docs)

Approval

Number of approvals: 1

Test

import pydarn
import cartopy.crs as ccrs
import cartopy.feature as cfeature
import datetime as dt

# Setup a zoomed in geographic axis
ax, _ = pydarn.plotting.projections.axis_geographic(dt.datetime(2024, 10, 9), plot_center=[-100.2, 70], plot_extent=[40, 40], grid_lines=False)

# Add coloured landmasses for a nice aesthetic 
land_50m = cfeature.NaturalEarthFeature('physical', 'land', '50m', edgecolor='black', facecolor='ivory', linewidth=0.2)
ax.add_feature(land_50m, zorder=0)

# Plot red stars at all northern hemisphere radars except those that are decommissioned (see https://superdarn.ca/radar-info)
for stid in pydarn.SuperDARNRadars.radars.keys():
    if pydarn.SuperDARNRadars.radars[stid].hemisphere == pydarn.Hemisphere.North:
        if stid not in [2, 8, 9, 10]:
            pydarn.Fan.plot_radar_position(stid, ax=ax, date=dt.datetime(2024, 10, 9), coords=pydarn.Coords.GEOGRAPHIC, projs=pydarn.Projs.GEO, transform=ccrs.PlateCarree(), marker='*', markersize=10, line_color='red')

Output:
Screenshot 2024-10-09 at 12 42 55

@RemingtonRohel RemingtonRohel mentioned this pull request Oct 9, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant