Skip to content

Fix logo plotting issue when colorbar is added #124

@kevindougherty-noaa

Description

@kevindougherty-noaa

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions