Code Monkey home page Code Monkey logo

Comments (3)

djhoese avatar djhoese commented on June 14, 2024

I don't know if I'd say "by design". A lot of vispy's visuals were developed out of a necessity for them and the user experience and consistency with other visuals was an after thought. In general Visuals provide a .set_data method to combine all types of "updates" in a single method and the Arrow provides this.

This is due to the complexity of how updating a visualization works where if it was a property like .pos = new_data we could be making position incompatible with the previous properties of the Visual (ex. array of colors), but we also usually want the GUI to be redrawn right away when we do this setting. So in general the availability of property-style setters depends on the needs of the Visual. Hopefully this helps, but .set_data is probably what you need for now.

from vispy.

bjamturley avatar bjamturley commented on June 14, 2024

Gotcha, I missed that in the documentation. I was a little thrown off because some of the other properties like arrow_color have to be modified directly and because other objects like ellipse don't have the method. Very much appreciate the quick response though, thanks for developing this out.

from vispy.

djhoese avatar djhoese commented on June 14, 2024

Yeah consistency is a problem in vispy. It could be fixed or cleaned up but it would require more work than the limited maintainer time can handle. It would also likely break backwards compatibility.

from vispy.

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.