Announcement

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

  • Graphs: any way to change solid to other patterns?

    Hi everyone,

    I wonder if anybody has figured out how to change a solid pattern to others in a graph, such as polka dots, hatched marks. It seems that we cannot according to the previous post (https://www.stata.com/statalist/arch.../msg00199.html), but this was posted somewhat a long time ago.

    If we cannot even with the version 15, is there anybody who was able to overcome this? For example, exporting Stata graphs in a certain format, and change the solid pattern to something else using other packages (but maintaining figure quality).

    Goro

  • #2
    Nothing official. The logic discussed in the thread you cite still applies at least in the sense that StataCorp do not support any such and presumably for the same reasons.

    But Sergiy Radyakin did some work on this. See his home page http://www.worldbank.org/en/about/pe...ergiy-radyakin for links and

    Code:
    . ssc desc twoway_parea
    
    ---------------------------------------------------------------------------------
    package twoway_parea from http://fmwww.bc.edu/repec/bocode/t
    ---------------------------------------------------------------------------------
    
    TITLE
          'TWOWAY_PAREA': module to generate area graph with pattern fills (Windows
            only)
    
    DESCRIPTION/AUTHOR(S)
          
          twoway parea is a modification of standard Stata  twoway area
          command. It uses some undocumented features  of Stata to enable
          pattern fills (tested in MS Windows only).  It might be
          particularly helpful for the purpose of   creating graphs
          suitable for monochrome print.
          
          KW: graphics
          KW: area plot
          KW: patterned fills
          
          Requires: Stata version 9 for Windows
          
          Distribution-Date: 20080410
          
          Author: Sergiy Radyakin, Development Economics Research Group, World Bank
          Support: email [email protected]
          
    
    INSTALLATION FILES                         (type net install twoway_parea)
          twoway_parea.hlp
          ../y/yxview_parea_draw.ado
          ../p/parea_g.class
          ../p/pareakey_g.class
          twoway_parea_parse.class
          ../y/yxtype-parea.style
    
    ANCILLARY FILES                            (type net get twoway_parea)
          ../p/pareademo.do
    ---------------------------------------------------------------------------------
    (type ssc install twoway_parea to install)

    Comment


    • #3
      Thank you, Nick!

      I tried this, but I found a difficulty to run this package. It worked with my version 14 but did not with my version 15. I communicated with the author and Stata Tech Support, but in vain. Also, I tried to figure out how to use this package for other graphs, such as bar graphs, histograms, but I could not, either. It seems that I need to use other software for this graphing task...

      Comment


      • #4
        I've never used it, so can't comment further.

        Comment


        • #5
          Just for info. It seems that packages that manage vector graphics work. I tried Adobe Illustrator (Ai), and it worked. Although it was not a one-step procedure and it took time to understand how Ai works, the results were very satisfactory. Involved steps were: save a Stata graph as pdf (eps would work - I have not tried); import the file to Ai; make patters I want; apply created patterns to solid colors in the graph. However, this can be a painful procedure since you have to do manually. I got to know that there are free and lower-cost packages that manage vector graphics, but I have not tried them.

          Comment


          • #6
            In December, a workaround to allow parea to work with Stata 15 was posted by StataCorp in the topic linked below, posts #12 and 13.

            https://www.statalist.org/forums/for...59#post1476359

            The problem with Stata 15 compatibility is due to a change in the default graph renderer, the workaround is an undocumented way of using the previous renderer, and there are warnings about why this is not a great idea generally.

            Comment

            Working...
            X