Giter VIP home page Giter VIP logo

Comments (6)

bjarthur avatar bjarthur commented on June 4, 2024

you can specify exactly where to put ticks with Guide.xticks: http://gadflyjl.org/stable/gallery/guides/#[Guide.xticks](@ref),-[Guide.yticks](@ref)

from gadfly.jl.

bjarthur avatar bjarthur commented on June 4, 2024

ideally, at some point it would be nice to hoist granularity_weight and friends into the Theme struct and/or kwargs to Guide.{x,y}ticks.

from gadfly.jl.

tvqt avatar tvqt commented on June 4, 2024

@bjarthur Thanks for your reply! I had replied to a StackExchange with that answer, but I was wondering/hoping there would be something better to tell them.

Alas! Oh well! Thank you anyway

from gadfly.jl.

bjarthur avatar bjarthur commented on June 4, 2024

i'd forgotten that granularity_weight can be specified in Stat.xticks:

help?> Stat.xticks
  Stat.xticks[(; ticks=:auto, granularity_weight=1/4, simplicity_weight=1/6,
              coverage_weight=1/3, niceness_weight=1/4)]

  Compute an appealing set of x-ticks that encompass the data by transforming the x, xmin,
  xmax, xintercept and xend aesthetics into the xtick and xgrid aesthetics. ticks is a vector
  of desired values, or :auto to indicate they should be computed. the importance of having a
  reasonable number of ticks is specified with granularity_weight; of including zero with
  simplicity_weight; of tightly fitting the span of the data with coverage_weight; and of
  having a nice numbering with niceness_weight.

it doesn't provide a way to directly specify the number of ticks though.

from gadfly.jl.

nsajko avatar nsajko commented on June 4, 2024

Could this be reopened? I think that a good interface would be to allow the user to provide an interval for Gadfly to choose the number of tick marks from, for example: there should be no less than four ticks and no more than ten.

My issue in particular is that some of my plots have only a single tick mark on the x-axis.

from gadfly.jl.

nsajko avatar nsajko commented on June 4, 2024

Scale.x_continuous actually accepts the parameters minticks and maxticks, and those are actually documented. The parameters don't seem to affect my plots though, I think that Gadfly maybe just ignores them for some reason?

from gadfly.jl.

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.