Question: # Create a figure and axis with PlateCarree projection fig, ax = plt . subplots ( figsize = ( 1 5 , 1 0 )
# Create a figure and axis with PlateCarree projection
fig, ax pltsubplotsfigsize subplotkwprojection: ccrsPlateCarree
# Add features to the map
axaddfeaturecfeatureCOASTLINE
axaddfeaturecfeatureBORDERS
axaddfeaturecfeatureSTATES, linestyle:
# Define a color map
uniqueyears dixiyrunique
colormap pltcmgetcmaptab lenuniqueyears
# Plot each tornado path with a different color based on the year
for year, color in zipuniqueyears, colormap.colors:
yeardata dixidixiyear year
axplotyeardata, transformccrsPlateCarree
# Add a legend
pltlegendtitle'Year', loc'upper right'
# Set titles and labels
plttitleTornado Paths'
pltxlabelLongitude
pltylabelLatitude
# Show the plot
pltshow
I am attempting to create a map with tornado paths colored by year, on a map of dixie alley, but I keep running into an error of AttributeError: 'GeoAxes' object has no attribute autoscaleXon'. Any assistance is appreciated.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
