Announcement

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

  • Cut off minimum and maximum value along axes in contour plot

    I am trying to generate a contour plot using the code below. The frustrating thing that I haven't yet been able to figure out is how to avoid the minimum and maximum value along both axes from being cut in half. To understand the problem, note the small square in the WY-WY cell on the bottom right of the attached plot, compared to the size of all the other squares off the ends off the axes. How can I make it that the ends of the axes are displayed as full-sized squares? Thanks in advance!

    local color = "cranberry"
    twoway (contour tot_invest_rh_state_sh investorstate_code_num companystate_code_num, heatmap ccuts(0.01 10 20 30 40 50 60 70 80 90 100.01) ccolors(white `color'*0.1 `color'*0.2 `color'*0.3 `color'*0.4 `color'*0.5 `color'*0.6 `color'*0.7 `color'*0.8 `color'*0.9 `color')), graphregion(color(white)) ysize(4.1) xsize(5) title("'", size(medsmall)) ytitle("", size(small)) ylabel(#51, labsize(tiny) valuelabel angle(0) nogrid) yscale(reverse) xtitle("", size(small)) xlabel(#51, labsize(tiny) angle(90) valuelabel) ztitle("", size(small)) zlabel(0(10)100, labsize(small))
    Attached Files

  • #2
    Underlying the axes labels are some numerical values, so you likely have to set the range of the axes using -yscale(range())- and -xscale(range())-. But I will be that vague without a reproducible example. See FAQ Advice #12 on how to present one in case you cannot make further progress.

    Comment

    Working...
    X