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 Hatch Patterns for Glyphs #10824

dbeezt opened this issue Jan 7, 2021 · 2 comments · Fixed by #10825

Add Hatch Patterns for Glyphs #10824

dbeezt opened this issue Jan 7, 2021 · 2 comments · Fixed by #10825


Copy link

dbeezt commented Jan 7, 2021

I was surprised to see that hatch patterns can't be applied to Glyphs, at least not to those of class 'Circle'. There's render-able space so it seems fitting to allow a pattern to occupy it just as a colour would.

Example code:

g = nx.erdos_renyi_graph(n = 20, p = 0.5)  
graph_renderer = from_networkx(g, nx.spring_layout, scale=1, center=(0, 0))
graph_renderer.node_renderer.glyph = Circle(size='5', fill_color='green', hatch_pattern='static')

Results in AttributeError: unexpected attribute 'hatch_pattern' to Circle, possible attributes are angle, angle_units, fill_alpha, fill_color, js_event_callbacks, js_property_callbacks, line_alpha, line_cap, line_color, line_dash, line_dash_offset, line_join, line_width, name, radius, radius_dimension, radius_units, size, subscribed_events, tags, x or y.

Copy link

mattpap commented Jan 8, 2021

It makes sense to have hatch patterns supported for all glyphs that already support fill visuals. PR #10825 implements this.

Copy link

dbeezt commented Jan 10, 2021

Talk about a fast turnaround! That's awesome, thanks for engaging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

2 participants