Giter Club home page Giter Club logo

Comments (1)

marcharper avatar marcharper commented on July 17, 2024

Can you post the code that triggers the issue? In python ticks will be False if ticks is empty [] or None, so I'm not sure that it's necessary to check if ticks is None versus not ticks. In any case I'd like to see what you passed in so that the issue can be fixed.

locations is necessary because ternary does not know if you want to use equally spaced ticks or not, which is the assumed behavior if locations is not supplied. Also, I think that it would be confusing if ticks=None and ticks=[] had different behaviors -- the reason that ticks=None renders something is because multiple has a non-zero default value. I'm not trying to get in the users head, and the following behaviors seem sufficient to me:

  • Don't call tax.ticks() if you don't want any ticks
  • Supply ticks=[...] to tax.ticks(ticks=[...]) if you want custom values to be equally spaced out. Of course you could just change the value of multiple for many such cases. If ticks=[] or None then fall back to equally spaced ticks based on multiple and scale. I assume that if the user calls tax.ticks() they want something to render.
  • Supply both ticks and their locations to allow whatever the user could possibly want

from python-ternary.

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.