Giter Club home page Giter Club logo

Comments (10)

marcharper avatar marcharper commented on July 17, 2024

Nice diagrams! Yes the current mapping is tuples to triangles rather than points. This was intentional for the original application since I needed to see from the heatmap exactly what was happening on the boundary.

This should be a relatively easy change -- there is already an iterator that computes the average value of the neighbors, so I would guess it can be adapted for this purpose

from python-ternary.

chebee7i avatar chebee7i commented on July 17, 2024

Ah yes, I can see how the current setup would be really helpful when the boundary is important (as it often is).

from python-ternary.

marcharper avatar marcharper commented on July 17, 2024

I'll give this the old college try now that I'm thinking about it. I need names for the two different triangular heatmap styles, right now it's just "triangular" or "hexagonal". Any ideas?

from python-ternary.

chebee7i avatar chebee7i commented on July 17, 2024

It's tempting to think of the one which maps vertices to faces as "dual". That may or may not be informative to users though. Perhaps it is better for the name to give a sense for how the original points are represented.

A: upright triangles in the heatmap are in a 1-1 correspondence with original vertices
B: vertices of all triangles in the heatmap are in a 1-1 correspondence with the original vertices

Maybe:

A: triangular_center : larger grid, with the original vertices appearing as triangle centers
B: triangular_vertex : same size grid, with the original vertices appearing as triangle vertices

No matter the name, a picture will probably be the most helpful. Eventually, I can TikZ up something nice instead of these Inkscape hacks. Mentioning their use cases in the docstring is probably good too.

path8433-0-7

from python-ternary.

marcharper avatar marcharper commented on July 17, 2024

OK I have a working implementation.

I'll push a new branch later today (I'm busy for the next few hours), and hopefully we can test it a bit.

from python-ternary.

marcharper avatar marcharper commented on July 17, 2024

@chebee7i Can you add your latest image (two posts up) to the images branch in the readme_images folder and submit a PR? I'd like to add it to the documentation (and give you credit).

from python-ternary.

marcharper avatar marcharper commented on July 17, 2024

Ok, I pushed a new branch "alt-heatmap". It still needs a bit of work (I think I can refactor the heatmap function and it needs updated documentation), but it will plot the two styles above (correctly I think). I renamed the dual style to "dual-triangular" (or just "d") and the vertex-blending one just "triangular".

from python-ternary.

chebee7i avatar chebee7i commented on July 17, 2024

Sure thing. I'll render with TikZ and send a PR later today.

from python-ternary.

chebee7i avatar chebee7i commented on July 17, 2024

Opps...didn't get around to TikZing it. What are your thoughts on this picture? I'm wondering if we can get by without the arrows. It requires that you look back and forth between the colored triangle and the colorbar, but with proper prose, perhaps this is enough.But don't feel obligated to agree. If it doesn't convey the point clearly enough, I'm happy to put the effort into the doing this with TikZ. One advantage of this Python solution is that the source code can be included as well.

heatmap_styles

from python-ternary.

marcharper avatar marcharper commented on July 17, 2024

This is nice. I do like the one with the arrows as well, but I'm biased since I already know how the various heatmaps work, so I'm probably not the best judge of which version is most clear to new people. We can include both images of course. Some thoughts:

  • It's not necessary to TikZ the arrows image, it's fine as is
  • The color version might be easier to understand if in black and white (or a single color)
  • The hexagonal one is nice, it might benefit from being slightly larger so the full range of interior shapes is included
  • Please include the generating code!

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.