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 alpha to plt.colorbar when using pyplot.contourf #372

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

billetd
Copy link
Contributor

@billetd billetd commented Jan 31, 2024

Scope

This is a really small change to fix the alpha in the map potential colour bar. The mappable object created for the colour bar doesn't preserve the alpha used when using plt.contourf(). This change adds it in.

Current behaviour:
Screenshot 2024-01-31 at 2 58 15 PM

Fixed behaviour:
Screenshot 2024-01-31 at 3 29 54 PM

issue:

Approval

1

Test

import pydarn
import matplotlib.pyplot as plt
import datetime as dt

mapfile = '20221130.n.map'
SDarn_read = pydarn.SuperDARNRead(mapfile)
map_data = SDarn_read.read_map()
record = dt.datetime(2022, 11, 30, 15, 0)
pydarn.Maps.plot_mapdata(map_data, start_time=record, lowlat=50, coastline=True, contour_fill=True, color_vectors=False)

@carleyjmartin carleyjmartin merged commit 4cb9a34 into develop Feb 2, 2024
@carleyjmartin carleyjmartin deleted the fix/contour_colourmap branch February 2, 2024 19:06
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.

2 participants