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

Fix logo plotting issue when colorbar is added #124

Open
kevindougherty-noaa opened this issue Mar 21, 2023 · 0 comments
Open

Fix logo plotting issue when colorbar is added #124

kevindougherty-noaa opened this issue Mar 21, 2023 · 0 comments
Assignees

Comments

@kevindougherty-noaa
Copy link
Contributor

The following code outputs a figure of 3D 2m temperature. When adding a colorbar, a second logo is plotted.

grid1 = MapGridded(latitude=lat3d,
                   longitude=lon3d,
                   data=arr3d)
grid1.cmap = 'cividis'

plot1 = CreatePlot()
plot1.plot_layers = [grid1]
plot1.projection = 'plcarr'
plot1.domain = 'global'
plot1.add_map_features(['coastline', 'states'])
plot1.add_colorbar()

fig = CreateFigure()
fig.plot_list = [plot1]
fig.create_figure()
fig.tight_layout()
fig.plot_logo(loc='bottom right', zoom=0.9, alpha=0.5)

image

Most likely this is because when plotting logos, it looks for all axes to plot on them. Colorbars are created as a new axis, so need to figure out how to handle this better.

@kevindougherty-noaa kevindougherty-noaa self-assigned this Mar 21, 2023
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

No branches or pull requests

1 participant