Content-Length: 272073 | pFad | http://github.com/fastplotlib/fastplotlib/issues/77

AD handling colors and other modifiable attributes · Issue #77 · fastplotlib/fastplotlib · GitHub
Skip to content

handling colors and other modifiable attributes #77

Closed
@kushalkolar

Description

@kushalkolar

The way colors are handled by Graphic is kinda of wonky now, I'm thinking of making a base class GraphicAttribute which is indexable, this would allow intuitive fine grained color control. It would probably also fix the current wonkyness of ScatterGraphic.

example:

plot = Plot()

line_graphic = plot.line(data=<sine_wave>)

line_graphic.colors[50:100] = "red"
line_graphic.colors[100:] = (0, 1, 0, 1)
line_graphic.colors = "w"
...

This would basically call pygfx geometry/material colors.data and the update_range() for only the indices modified

@EricThomson @clewis7 thoughts?

@clewis7 this will get rid of all the current update_<graphic_attr> methods, but we can change that later. For interactivity we can just allow anything that is a GraphicAttribute instance to be a modifiable feature.

Metadata

Metadata

Assignees

No one assigned

    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









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/fastplotlib/fastplotlib/issues/77

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy