Announcement

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

  • Scale graph

    Hi everyone, anyone know if is possible to create color or if there are color packages. I'm just trying here, but to be honest I dont like any. I need something like a traffic light

    here's my code

    mkmat s1 s2 s3 s4 s5 s6, matrix(promedios) rownames(cooperativa)
    matrix list promedios, format(%8.2f)
    foreach v in "cyan" "blue" "red" "green" "gold" "magenta" "pink" "orange_red" "ltblue" "ltbluishgray" "olive teal" "forest green" "sunflowerlime" "dkorange" "gs15 " {
    plotmatrix , mat(promedios) color("`v'") maxticks(15) ylabel(,angle(0)labsize(vsmall))xlabel(1 "Colaboración entre actores" 2 "Vinculación al mercado" 3 "Gobernanza" 4 "Acceso a servicios" 5 "Innovación incluyente" 6 "Medición de resultados", angle(30) labsize(vsmall))legend(size(*.8) pos(12))title("Calificación por Cooperativa") subtitle("Escala 0-5")note("Fuente: Elaboración propia en base a encuesta LINK.", span)ytitle("Cooperativas") scheme(sj) split (0 0.5 0.5 1 1 1.5 1.5 2 2 2.5 2.5 3 3 3.5 3.5 4 4 4.5 4.5 5)
    graph save Graph "graficos\prueba\puntaje cooperativa`v'.gph", replace
    }thanks!

  • #2
    The official release in SSC lacks some of the more recent fixes/additions, but you might be interested in brewscheme. It allows you to generate customized scheme files that make it possible to mix and match color palettes based on graph type. More recently I added a function for color interpolation as well. You can install from SSC with:

    Code:
    ssc inst brewscheme
    Or you can access the most recent version with:

    Code:
    net inst brewscheme, from("http://www.paces-consulting.org/stata")
    If you wanted to see how graphs created with some of the schemes look, I have a PDF in a GitHub repo for a new project that used a customized scheme for all the graphs:

    https://github.com/wbuchanan/eda

    Hope this helps

    Comment


    • #3
      Thanks! I will check the PDF.

      Comment


      • #4
        Wow, thanks Buchanan! I was just thinking the Stata universe needed something like that. What a wonderful set of analyses! Bravo! Will let you know of any bugs.
        Nathan E. Fosse, PhD
        [email protected]

        Comment


        • #5
          Notwithstanding William (Billy) Buchanan's excellent work here, note various other displays that can be accessed, e.g.

          full_palette from http://fmwww.bc.edu/RePEc/bocode/f
          'FULL_PALETTE': module to display color palette / This command displays a
          palette of Stata's graph colors, along / with their names and RGB numbers.
          You must start with an empty / data set. / Distribution-Date: 20030220 /
          Author: Nick Winter, Cornell University / Support: email [email protected]

          palette_all from http://fmwww.bc.edu/RePEc/bocode/p
          'PALETTE_ALL': module to display all the named colours in Stata / This
          command will display all Stata's named colours in one graph / so that you
          can make a comprehensive choice of how to colour your / graphs. There is
          only one option and that is to change the / background



          Comment


          • #6
            Nathan E. Fosse Thanks for the complement. A colleague of mine at work coined the phrase databoarding after I told him about the size of the document created by this recently (~ 3,500 pages). I find it fairly helpful/useful to run it over night and then get in in the morning and get a chance to peruse the graphs and tables rather than spending much time coding things. And it should be noted that the eda program wouldn't have been possible without the work of folks like Nick Cox and the rest of the Stata community who routinely put together extremely helpful and useful programs for others.

            Comment

            Working...
            X