Skip to content

legend of geometry respect styles except hatch #611

@gepcel

Description

@gepcel

When adding legend from ax.add_geometries, styles like fc, ec, alpha are respected, but hatch is ignored.

Example:

import shapely.geometry as sg
fig, ax = pplt.subplots(refwidth=4.2, proj='cyl')
ax.format(title="Semantic legend helpers", grid=False, lonlim=(-0.1, 2.1), latlim=(-0.1, 1.5))
poly1 = sg.Polygon([(0, 0), (2, 0), (1.2, 1.4)])
ax.add_geometries([poly1], pcrs, fc='gray5', ec='r', alpha=.2, hatch='/', label='Triangle-ish')
ax.legend(loc='uc')
ax.axis("off")

RESULT:

Image

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions