Code Monkey home page Code Monkey logo

Comments (7)

hageldave avatar hageldave commented on May 18, 2024 1

I'd say the developers should be able to define their own interactions in addition to "standard" interactions which are panning, scroll zooming, and area zooming.
The way the developers can add their custom interaction schemes needs a bit more thought I guess. I'll think of something

from jplotter.

lvcarx avatar lvcarx commented on May 18, 2024

Should the interaction possibilities (e.g. "select area and zoom into it") be predefined by the ScatterPlot class or should the user also be able to define his own interactions?
For example the CoordSysViewSelector class is abstract and therefore an object can't be returned to the user, before its methods are implemented. If i'm not missing anything, this implicates that the interaction possibilities have to be predefined by the ScatterPlot class?
This question might also apply to other interaction schemes, like the mouse/key listeners.

from jplotter.

hageldave avatar hageldave commented on May 18, 2024

As already discussed internally
The scatter plot class should provide a listener interface to be notified when a point of the scatter plot is hovered over by the mouse cursor. Something like mouseOverPoint(Point mouseLocation, Point2D pointLocation, double[] data, int dataIndex). The triggering has has to be realized through picking, meaning that on every mouseMoved event the current picking color under the cursor has to be fetched to check whether mouse over is occurring.

A similar functionality for clicking on a scatter plot point should also be supported, e.g.
pointClicked(int mouseButton, Point mouseLocation, Point2D pointLocation, double[] data, int dataIndex).

Not discussed internally
A rectangular selection of scatter plot points should also be supported in some way. I'm also thinking of a listener interface, e.g.
pointsSelected(Rectangle2D bounds, List<double[]> data, List<Integer> dataIndices) that is notified when a rectangular selection was made (not on area zooming though).

This should at least allow for a convenient implementation of most conventional scatter plot interactions.

(Please excuse my ignorance of the current point set/dataset structure of the scatterplot class in my suggested method signatures)

from jplotter.

hageldave avatar hageldave commented on May 18, 2024

TODO for me: check class for open issues. If ok, it can be merged.

from jplotter.

hageldave avatar hageldave commented on May 18, 2024

A lasso selection was introduced in branch rope-selection https://github.com/hageldave/JPlotter/tree/rope-selection
scatter plot was merged into the lasso branch, so these two features are coupled

from jplotter.

hageldave avatar hageldave commented on May 18, 2024

@lvcarx you mentioned that the branch https://github.com/hageldave/JPlotter/tree/temp-scatterplot-and-barchart had fixes which should be adopted. I don't want this temporary branch to be merged with anything (rather delete it at some point). So could you please copy the fixes? I think they are in these two commits:

  • 19b1bcc cue set sanitization
  • bc2306b not pointIdx=-1 for legend element color

from jplotter.

hageldave avatar hageldave commented on May 18, 2024

now in master as of 5758ffc

from jplotter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.