Giter Club home page Giter Club logo

Comments (22)

1313e avatar 1313e commented on June 1, 2024

I could certainly make a table like that.
However, it will solely be for CMasher colormaps, for which the RMSE is pointless to report (it is always zero).
It will take me some time to write a script for it, as I would like to make that table in an automatic way, just like all colormap data is handled automatically in a script.
And, I have to figure out where I am going to put it in the online docs.

Do you have any suggestions?

from cmasher.

ycopin avatar ycopin commented on June 1, 2024

You could put it in place of the long list of links under "Individual colormaps" in https://cmasher.readthedocs.io/user/sequential.html

Running your quantitative script on historical matplotlib cmaps would also have an interest, e.g. for people to realize the gain to use cmasher...

from cmasher.

1313e avatar 1313e commented on June 1, 2024

Uhm, that list is necessary to make the pages appear in the table of contents on the left.
In Sphinx, every page must be reachable from at least 1 other page without using the side bar.
However, I could put the table either right after the overview, or put it in the overview somehow.
Putting it in the overview somehow would actually make it such that all MPL colormaps also have this information visible if I turn it on for the overview in here.

from cmasher.

1313e avatar 1313e commented on June 1, 2024

Question for you, @ycopin: Would you also want to have the lightness profile type for sequential colormaps be visible?

from cmasher.

1313e avatar 1313e commented on June 1, 2024

So, for example, I can modify the colormap overviews to look like this:
test

from cmasher.

1313e avatar 1313e commented on June 1, 2024

Or this for all colormaps in MPL and CMasher.
test

from cmasher.

ycopin avatar ycopin commented on June 1, 2024

Wow, that's a lot to ingest! Thanks for the hard work!

  • can't links be included in tables?
  • what is the definition of the triplet in the previous figures: I assume 1st two are somehow min and max of lightness, or start en end values? (it doesn't seem to work with all cmaps though, e.g. greys or season). What is the 3rd value, RMS of derivatives? In which units?
  • I really like the individual lightness profiles in the "Full overview plot"!
  • Maybe I missed it, but how do you actually define lightness and perceptual ranges? The triplet seems to refer to lightness, but not to perception? Is it at all related to Hue/Saturation/Brightness quantities? (sorry if I ask stupid questions...)
  • Sorry, I don't understand the question "Would you also want to have the lightness profile type for sequential colormaps be visible?"...

from cmasher.

1313e avatar 1313e commented on June 1, 2024
  • They can, but I have a feeling you want to see the actual colormap when I am providing those values;
  • The values under the names are the three values you mentioned: Starting or central lightness value; lightness range and lightness RMSE;
  • The range is nothing more than the difference between the lowest and highest lightness/perceptual value;
    The triplet indeed refers to the lightness, not to the perceptual profile.
    The reason for that mostly is because the latter makes much less sense to the user than the former, while still telling a similar story.
    The only time when they wouldn't tell a similar story is when you would randomly pick colors with proper lightness values.
    As colormaps usually perform a track through colorspace, this does not happen very often.
    But, theoretically speaking, the lightness profile alone does not tell the full picture.
  • I also sort the sequential colormaps on their profile type first (as explained in the online docs) and was wondering if you wanted these to be visible as well. However, I personally think they don't provide any useful information to the user, so I won't actually include them.

from cmasher.

1313e avatar 1313e commented on June 1, 2024

Any thoughts?

from cmasher.

1313e avatar 1313e commented on June 1, 2024

I modified the 3 numbers to instead give starting/central lightness; final/outer lightness; and lightness RMSE values instead:
test

from cmasher.

ycopin avatar ycopin commented on June 1, 2024

Any thoughts?

I was thinking about a way to define the "colorfulness" of a cmap: is there a standard metric to measure it? Obviously, a colorful cmap have a large extent in the viscm (a', b') plane, while a dull one will have a small imprint, and vanishing for pure B&W cmaps. Could one estimate colorfulness from projected area in the (a',b') plane?

from cmasher.

1313e avatar 1313e commented on June 1, 2024

I could do so.
After all, in viscm, I have to calculate that as well.
Just wondering how useful it would be to have that number.
It would basically be the perceptual range, as reported on the individual colormap pages in the overview plot.

from cmasher.

ycopin avatar ycopin commented on June 1, 2024

It would basically be the perceptual range, as reported on the individual colormap pages in the overview plot.

Sorry to be a nuisance, but you repeatedly mention the "perceptual range", and I cannot seem to find any quantitative mention of it. The viscm shows the "perceptual derivative" in addition to "perceptual lightness deriv.", but I still don't understand how is defined perceptual range, or where to find the definition... :-/

from cmasher.

1313e avatar 1313e commented on June 1, 2024

The perceptual range/derivative is a measure of the amount of color change there is in a colormap.
I can give you an exact definition of it if you want, but that just involves lots of math.
The just of it is that the higher the number, the more different colors a colormap goes through, and the more distinguishable neighbouring colors will be (assuming it is a perceptual uniform sequential colormap).

from cmasher.

1313e avatar 1313e commented on June 1, 2024

@ycopin Do you have any further comments or suggestions?

from cmasher.

ycopin avatar ycopin commented on June 1, 2024

Nope, thanks!

from cmasher.

1313e avatar 1313e commented on June 1, 2024

Alright, so I am thinking of replacing the RMSE of the lightness profile with the perceptual derivative instead, as that gives more insight into the number of colors that the colormap has.
After that, would you agree that replacing the sequential and diverging colormap overviews on the docs with an overview that has this information as well, solves your issue?

from cmasher.

ycopin avatar ycopin commented on June 1, 2024

I just provide semi-constructive comments, feel free to proceed as you think is best! And again, thanks for the hard work.

from cmasher.

1313e avatar 1313e commented on June 1, 2024

So, this is what I was thinking of.
Of course, I will add an explanation of what the three numbers mean, but they give the starting/central lightness value; the final/outer lightness value; and the perceptual range of every colormap.
Basically, the first two numbers state what the range of lightness values is that the colormap covers.
The third value is a measure of how many colors there are in the colormap.
The lower the number, the less change in color there is between neighboring segments.

You can see this overview below.
I also am now sorting the colormaps within each group on the perceptual range, where you can see rather easily that the higher the value is, the more colors there are.
test

Do you think these values themselves like this are helpful in picking a proper colormap?

from cmasher.

ycopin avatar ycopin commented on June 1, 2024

IMHO,

  • The 1st two numbers should be min and max, because the order is not really meaningful and a bit confusins (you can always take the reversed cmap)
  • the 3rd number should somehow be normalized: strange to see "colorfulness = 100" for a grey cmap!
  • Yes, I think this would be useful in tabular form, where one could order according to the various quantities.

from cmasher.

1313e avatar 1313e commented on June 1, 2024
  • The first two numbers are min and max lightness, for sequential colormaps that is.
    Diverging and cyclic colormaps have no min and max, so I give the central and edge lightness values instead.
  • The perceptual range has no maximum value, and therefore cannot be normalized.
    One could make a colormap that has a perceptual range below 100 but does have other colors than grey.
    This would however require a lightness range that is less than 100.
    I agree that it might look weird that neutral has a value of 100 (even though that makes perfect sense once you know how that value is calculated), but given that there is no maximum value and the minimum value is zero, there is no way to normalize the values.
  • The docs are in RST, which cannot have any interactable tables in them.
    So, it does not matter whether the values are in a table or in a plot.

from cmasher.

1313e avatar 1313e commented on June 1, 2024

This was added in v1.6.1.

from cmasher.

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.