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 — make a `PlotFrame` class for `Toolbar` and `sidecar` functionality · Issue #310 · fastplotlib/fastplotlib

make a PlotFrame class for Toolbar and sidecar functionality #310

New issue
Copy link
New issue
Copy link
Closed
#313
Closed
make a PlotFrame class for Toolbar and sidecar functionality#310
#313
Copy link

Description

@clewis7
clewis7
opened on Sep 23, 2023
Issue body actions

TODO once #300 is merged

Activity

  1. clewis7 commented on Sep 23, 2023

    @clewis7
    clewis7
    on Sep 23, 2023
    MemberAuthor
    More actions

    show() method is getting pretty spaghetti-like, need to create a class for Plot and GridPlot to subclass from

  2. kushalkolar commented on Sep 24, 2023

    @kushalkolar
    kushalkolar
    on Sep 24, 2023
    Member
    More actions

    More thoughts from #300 :

    1. I don't think we can use Widget or any ipywidget imports, such as VBox directly within show() because if ipywidgets is not installed in the environment (if they are using fastplotlib with only glfw or Qt), this will raise a error.
    2. Likewise, since Sidecar is referenced in show(), it will raise an error if it's not installed.

    Proposed solution:

    • Create PlotFrameBase and two subclasses PlotFrameNotebook and PlotFrameDesktop. The notebook subclass implements the toolbar, other ipywidget stuff, and sidecar. The desktop subclass has a more basic show().

    Need to think about how exactly to implement this. Should Plot and GridPlot just inherit from PlotFrame? Can probably use a __init_subclass__ method that determines if it's running in a nb or not, and then starts the right subclass.

  3. kushalkolar commented on Oct 2, 2023

    @kushalkolar
    kushalkolar
    on Oct 2, 2023
    Member
    More actions

    All toolbar buttons should be @properties so the button states and programmatic access are synced

  4. kushalkolar commented on Oct 4, 2023

    @kushalkolar
    kushalkolar
    on Oct 4, 2023
    Member
    More actions

    Thinking about this a bit, and I think that the best way to organize this is to get some direct inspiration from pyqtgraph 😄

    https://pyqtgraph.readthedocs.io/en/latest/getting_started/plotting.html#organization-of-plotting-classes

    image

  5. kushalkolar commented on Oct 12, 2023

    @kushalkolar
    kushalkolar
    on Oct 12, 2023
    Member
    More actions

    sidecar instance, and other plot "housekeeping" instances should be read-only properties.

  6. kushalkolar commented on Oct 26, 2023

    @kushalkolar
    kushalkolar
    on Oct 26, 2023
    Member
    More actions

    @clewis7 what are you thoughts on making a PlotFrame that's compatible with both ipywidgets and Qt? As much as we like ipywidgets, I think it's inevitable that a lot of people will want Qt. In notebooks we are quite limited by the jpeg encoding, which really becomes limiting as we approach 4k resolutions especially on laptops.

  7. clewis7 commented on Oct 26, 2023

    @clewis7
    clewis7
    on Oct 26, 2023
    MemberAuthor
    More actions

    I think supporting Qt would be great, would also help with the napari embedding too probably

  8. kushalkolar commented on Oct 26, 2023

    @kushalkolar
    kushalkolar
    on Oct 26, 2023
    Member
    More actions

    this wouldn't help with napari, that's really a napari-specific issue where their canvas isn't easily swapped out

  9. kushalkolar
    closed this as completedin #313on Oct 31, 2023
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 01402520 — 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.