GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — handling colors and other modifiable attributes · Issue #77 · fastplotlib/fastplotlib

handling colors and other modifiable attributes #77

New issue
Copy link
New issue
Copy link
Closed
Closed
handling colors and other modifiable attributes#77
Copy link

Description

@kushalkolar
kushalkolar
opened on Dec 18, 2022
Issue body actions

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.

Activity

  1. EricThomson commented on Dec 19, 2022

    @EricThomson
    EricThomson
    on Dec 19, 2022
    Contributor
    More actions

    This seems great I really like it! Would make certain things really intuitive and simple.

  2. kushalkolar commented on Dec 20, 2022

    @kushalkolar
    kushalkolar
    on Dec 20, 2022
    MemberAuthor
    More actions

    Could also add sizes, at least for scatter, might also be possible for line

  3. kushalkolar commented on Dec 21, 2022

    @kushalkolar
    kushalkolar
    on Dec 21, 2022
    MemberAuthor
    More actions

    @clewis7 once #61 is merged we need to think of how to trigger events when a GraphicAttribute changes its data, will have to work for Graphic and GraphicCollection objects.

  4. kushalkolar commented on Dec 24, 2022

    @kushalkolar
    kushalkolar
    on Dec 24, 2022
    MemberAuthor
    More actions

    for now thing left to do is sizes

  5. kushalkolar commented on Dec 26, 2022

    @kushalkolar
    kushalkolar
    on Dec 26, 2022
    MemberAuthor
    More actions

    mostly implemented in #78 and #88, this issue superseeded by #85

  6. kushalkolar
    closed this as completedon Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.