Announcement

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

  • Rotate graph

    Hello Statalist.

    I have a very annoying problem that I simply cannot figure out; I need to rotate a graph made with the user-written program
    Code:
    radar
    . I would like to rotate the graph by 22.5 degrees and I have been doing so by hand but I would like to automate the process - if it can be done in the radar.ado that would be great because I only need output in the rotated form. Before I go on, please have a look at the output:

    Code:
    input str3 oc double OC
    oc1 .55
    oc2 .41
    oc3 .55
    oc4 .38
    oc5 .44
    oc6 .27
    oc7 .3
    oc8 .54
    end
    
    radar oc, scheme(s2color) radial(OC)  lw(vvthick) /// 
    legend(off) axelaboff lc(cyan*1.29) r(0 .25 .5 .75 1) /// 
    labsize(zero) note("") graphregion(color(white))
    This code gives me this graph:

    Click image for larger version

Name:	radargraph.png
Views:	1
Size:	77.7 KB
ID:	1450467




    The problem is, I would like it to look like this instead:

    Click image for larger version

Name:	imgonline-com-ua-Rotate360-cY0u5pXLFrgK.jpg
Views:	1
Size:	90.8 KB
ID:	1450468



  • #2
    Reviewing viewsource radar.ado leads me to conclude that there is no option - either to radar or to the underlying twoway command - to produce the result you want. Your only option would seem to be to use the source for radar.ado and modify it (creating your own version) in a new ado file to place its initial spoke at the location you want. It's not straightforward code, because while the graph looks as though it were plotted in a radial (angle and length) coordinate system, it is being drawn using an x-y coordinate system.

    Comment

    Working...
    X