[R-sig-eco] Help with R command 'probPlot' from the 'smwrGraphs' package

Stonewall, Adam stonewal at usgs.gov
Thu Apr 26 17:20:45 CEST 2018


Howdy,

I'm a novice R coder, so apologies in advance if I'm not asking this
question in a straightforward manner or am neglecting needed information.

I'm having trouble producing .pdf plots using the R command 'probPlot' from
the 'smwrGraphs' package (a USGS package).

The script:

 *par(las=1)*
* probPlot(DCC1, FLIP=T, xtitle = "Exceedance Probability",*
*          ytitle= paste0(NCon1," concentration in mg/L"),*
*          margin = c (4, 4, 4, 4))*
* title(main=paste(run, NCon1))*
* abline(h = log10(TPStand), lty=3)*

works fine, and produces a plot on the screen as I would expect. However,
if I use the 'pdf' command with this script:

 *pdf(paste0(run,NCon1,".pdf"),height=10,width=10)*
* par(las=1)*
* probPlot(DCC1, FLIP=T, xtitle = "Exceedance Probability",*
*          ytitle= paste0(NCon1," concentration in mg/L"),*
*          margin = c (4, 4, 4, 4))*
* title(main=paste(run, NCon1))*
* abline(h = log10(TPStand), lty=3)*
* dev.off()*

I get wildly inconsistent results. On rare occasion it seems to work for no
reason. But the most common error script is:

> pdf(paste0(run,NCon1,".pdf"),height=10,width=10)
>  par(las=1)
>  probPlot(DCC1, FLIP=T, xtitle = "Exceedance Probability",
+           ytitle= paste0(NCon1," concentration in mg/L"),
+           margin = c (4, 4, 4, 4))
Error in mtext(text = labels, side = 2L, at = pretty$labelpos, line = 0.2,
:
  invalid font type
In addition: There were 20 warnings (use warnings() to see them)
>  title(main=paste(run, NCon1))
Error in title(main = paste(run, NCon1)) : invalid font type
In addition: Warning messages:
1: In title(main = paste(run, NCon1)) :
  font family 'USGS' not found in PostScript font database
2: In title(main = paste(run, NCon1)) :
  font family 'USGS' not found in PostScript font database
3: In title(main = paste(run, NCon1)) :
  font family 'USGS' not found in PostScript font database
4: In title(main = paste(run, NCon1)) :
  font family 'USGS' not found in PostScript font database
5: In title(main = paste(run, NCon1)) :
  font family 'USGS' not found in PostScript font database
>  abline(h = log10(TPStand), lty=3)
>  dev.off()
RStudioGD
        2

Anyone have any advice or suggestions?
Thanks,
Adam


-- 
Adam Stonewall, Hydrologist
USGS Oregon Water Science Center
2130 SW 5th Avenue
Portland, OR  97201
(503) 251- 3276

	[[alternative HTML version deleted]]



More information about the R-sig-ecology mailing list