Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Color sight impairment proofing of Stata graphs

    This is a combination of announcement/call for testers for a program I've been working on building out for a few months now. There is now a simple way to proof your Stata graphs based on simulated translation of the RGB color space for varying forms of colorblindness. The prefix command
    Code:
     brewproof, scheme(schemename):
    can be used before a graph command to generate a series of translated graphs as well as a proof copy to show a simulated view of the graph as it would be viewed by individuals with achromatopsia (complete color vision loss), protanopia (red color impairment), deuteranopia (green color impairment), and tritanopia (blue color impairment). Although it is possible to extend the functionality to allow the command to work with existing Stata schemes, it would be a significant amount of additional work for limited additional functionality. However, I've recently made some updates to -brewscheme- and -brewtheme- that automatically generate the equivalent schemes translated for different forms of colorblindness. So, now the single call generates the schemes :

    scheme
    scheme_achromatopsia
    scheme_protanopia
    scheme_deuteranopia
    scheme_tritanopia

    The -brewproof- prefix wraps the graph command and passes each version of the scheme file as an argument before combining the simulated version of the graphs into a single proof copy (e.g., all four colorblind simulated graphs are included in a single graph using the settings from the original/baseline schemefile). A more detailed example can be found at the brewproof project page at: http://wbuchanan.github.io/brewscheme/brewproof/. To test the newest functionality you can use:

    Code:
    net inst brewscheme, from("http://wbuchanan.github.io/brewscheme/") replace
    There are instructions for updating/first time installations available here: http://wbuchanan.github.io/brewscheme/about. If you find any bugs, have any feature requests, etc.. please submit an issue at https://github.com/wbuchanan/brewscheme/issues/new and I'll do my best to resolve the issue quickly.

    And in case you wanted to see more direct examples of what the -brewproof- prefix does:













  • #2
    Thanks to ericmelse for finding an issue with the installation instructions above. The brewcolors.ado file was still included in the .gitignore file, so it was not being tracked/pushed into GitHub with the rest of the files. This issue is reported here for anyone else interested: https://github.com/wbuchanan/brewscheme/issues/16.

    Code:
    net inst brewscheme, from("http://wbuchanan.github.io/brewscheme/") replace
    The installation instructions above should work now for anyone. Additionally, if you have a previous version installed, you should reinstall using the directions above. There was a breaking change dealing with a page redirect (https://github.com/wbuchanan/brewscheme/issues/15) that was introduced by ColorBrewer. This issue is resolved in the development branch (which is what the instructions above would install), but will break existing programs if -brewdb- is called directly with the refresh option, or if -brewextra- is called with the refresh option. More importantly, however, is that there have been non-trivial changes to brewscheme and brewtheme that are used to automatically generate clones of the files for the different forms of color sight impairment that require a call to one of those programs with the refresh option specified (now the palette database includes transformed RGB values automatically to save a bit of overhead at runtime from not having to recompute the transformed values all the time).

    Comment


    • #3
      Version 1.0 of brewscheme is now available from the SSC archives. This version includes the fix mentioned in the post above as well as any other bugs that I or anyone else was able to find.

      Comment


      • #4
        Hi William, I am looking a for a good colorblind scheme. I have tried your package, but getting errors:

        Code:
        . brewproof, scheme(ggtest2) : graph hbar (asis) percent , over(id)
          1
        brewproof could not find the file /Users/sonnen/Library/Application Support/Stata/ado/plus/s/scheme-ggtest2.s
        > cheme.  You may need to rebuild it with brewtheme and brewscheme if you used brewscheme v < 1.0.0 to create the sch
        > eme file
        invalid syntax
        r(198);
        The website you mentioned is also inactive:

        Code:
        http://wbuchanan.github.io/brewscheme/brewproof/
        Can you please see how to solve this error.

        Thank you.

        Comment


        • #5
          Sonnen Blume
          The correct URL is https://wbuchanan.github.io/brewscheme/help/brewproof/. The error message that you got is because you didn't create a brewscheme based scheme named ggtest2. The help files/documentation on Github will show how to create a simulated ggplot2 based scheme (http://wbuchanan.github.io/brewscheme/help/brewtheme/).

          Comment

          Working...
          X