Skip to content

Commit

Permalink
Adjust 'fig' and 'inset'
Browse files Browse the repository at this point in the history
  • Loading branch information
arni-magnusson committed Nov 11, 2022
1 parent d80f5dc commit 570c327
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/plotCat.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ plotCat <- function(dat, method="cmsy.naive", cats=4, type="count", legend=TRUE)
else if(type == "prop")
{
if(legend)
opar <- par(fig=c(0,0.85,0,1))
opar <- par(fig=c(0,0.8,0,1))
percent <- 100 * prop.table(table(status$year, status$estCat), margin=1)
areaplot(percent, col=col, ann=FALSE, xaxs="i", yaxs="i", border=NA)
abline(h=c(20,40,60,80), col="lightgray", lty=2)
Expand All @@ -103,7 +103,7 @@ plotCat <- function(dat, method="cmsy.naive", cats=4, type="count", legend=TRUE)
if(legend)
{
legend("right", rev(levels), fill=rev(col), border=NA, bty="n",
inset=c(-0.25,0), xpd=NA)
inset=c(-0.3,0), xpd=NA)
par(opar)
}
invisible(col)
Expand Down

0 comments on commit 570c327

Please sign in to comment.