Coder Social home page Coder Social logo

Plot networks about bqplot HOT 4 CLOSED

bqplot avatar bqplot commented on May 18, 2024
Plot networks

from bqplot.

Comments (4)

SylvainCorlay avatar SylvainCorlay commented on May 18, 2024

cc @SSunkara

from bqplot.

ssunkara1 avatar ssunkara1 commented on May 18, 2024

@albop This looks great!!!

  1. Moving the nodes will be easy now. We can have drag on the Scatter and keep the Lines in sync with it. I can write up a quick example for that. The easiest way to do this would be to have the drag behavior on Lines with markers so that we need not do they sync stuff manually. This is part of the bigger to do, which is to add Scatter events to Lines with markers. Once we have that it should be very straight forward.
  2. Arrows, I am not sure if this will be very quick. We can add another Scatter with the Markers as arrows. This angle can be set using the skew or rotation attribute of the Scatter. Again, I will come up with a small example for this.
  3. Labeling the nodes will be very easy. You can add names attribute to the Scatter.

P.S.: Sorry for the late response. :(

from bqplot.

dmadeka avatar dmadeka commented on May 18, 2024

@albop Closed by #483

from bqplot.

fpom avatar fpom commented on May 18, 2024

Moving the nodes will be easy now. We can have drag on the Scatter
and keep the Lines in sync with it. I can write up a quick example for that.
The easiest way to do this would be to have the drag behavior on Lines
with markers so that we need not do they sync stuff manually. This is part
of the bigger to do, which is to add Scatter events to Lines with markers.
Once we have that it should be very straight forward.

Sorry to come back to this old issue, but you say that allowing to drag nodes would be easy to implement. However, it seems that the bqplot.marks.Graph does not allow it when nodes are placed using x and y attributes. I'm wondering if it can be made in this case.

Arrows, I am not sure if this will be very quick. We can add another Scatter
with the Markers as arrows. This angle can be set using the skew or rotation
attribute of the Scatter. Again, I will come up with a small example for this.

On this point also, I'd be interesting to know if something has been done also. I know that directed graphs can have arrows, but they are placed in the middle. I'd be interested in adding arrow at the tips of edges (and varied sorts of arrow if possible). I thinks I could do the maths to compute the arrow tips positions and angles, but I'd do it from Python, perhaps we can let D3 do it instead.

Thanks in advance for your answer!
Franck

from bqplot.

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.