Code Monkey home page Code Monkey logo

Comments (1)

dtm2451 avatar dtm2451 commented on June 7, 2024

For the underlying stat/geom:
I like the idea of stat_binhex() by default + stat_density_2d() when requested with something like do.contour. Alternatively, or additionally only when color is requested, we could use ggplot.multistats::geom_summaries_hex() to show density through opacity, thus leaving color open for some other target variable. But, I'll just admit now that I have almost zero experience using any of these, so ¯_(ツ)_/¯. That's definitely why dittoSeq doesn't already have a hex-functionality.

For the implementation:
We could modify dittoScatterPlot to be the base, and it's what I'd always thought would happen.
But looking into the geoms more, I don't love the idea because there are quite a few inputs in dittoScatterPlot that are not applicable. Also, if there end up being hex specific inputs, these would need to be exposed within the dittoScatterPlot doc. I think that all then gets confusing for users, so I don't like it.

Ultimately, no matter how we implement, we'll need to have a separate .ditto_scatter_hex() sub-function. Otherwise it'd get super dirty because half the code in .ditto_scatter_plot() parses shape or color. (Shape is useless for hexPlots, and coloring is implemented quite differently from geom_point, from what I can tell, for all hex geoms that handle it.)

So I propose we make a .scatter_data_gather() subfunction that would be shared between dittoScatterPlot() and a dittoScatterHex(). Then we can have .ditto_scatter_hex() build the plot with whatever geoms we choose. And dittoDimHex() can wrap around all that similarly to dittoDimPlot().

The "good news" here is that I don't think dittoDimHex() will have as many extra overlays as dittoDimPlot() -- really just the trajectory overlays -- so we could probably group dittoScatterHex() and dittoDimHex() together into a single piece of documentation.

And this is now implemented in #46

from dittoseq.

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.