From 87d63e649da5e12409c50cb06d3d2a01e9880759 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 15 Dec 2017 17:25:21 +0100 Subject: =?UTF-8?q?Improve=20handling=20of=20=C2=B5=20in=20y=20axis=20for?= =?UTF-8?q?=20plot.TOXSWA=5Fcwa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog | 14 ++++++++++++++ DESCRIPTION | 2 +- R/TOXSWA_cwa.R | 8 +++++++- build.log | 8 ++++---- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02a9284..647cc62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +commit 4944d7ade227f1dd54c94b6a02c3c849dc1fb8ab +Author: Johannes Ranke +Date: 2017-12-14 10:19:43 +0100 + + Update copyright date + +commit 0e1d517d4d6351f2d43ab8636363e73d8b8cf677 +Author: Johannes Ranke +Date: 2017-11-04 11:48:08 +0100 + + Option to thin low TOXSWA PECsw data for plotting + + to reduce the file size of plots e.g. as PDF files + commit eb4465035dd44907eae3ea0340221316b7cfca12 Author: Johannes Ranke Date: 2017-11-03 11:18:10 +0100 diff --git a/DESCRIPTION b/DESCRIPTION index b8c99df..b40c0bc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: pfm Type: Package Title: Utilities for Pesticide Fate Modelling Version: 0.4-5 -Date: 2017-11-04 +Date: 2017-12-15 Authors@R: person("Johannes Ranke", email = "jranke@uni-bremen.de", role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0003-4371-6538")) diff --git a/R/TOXSWA_cwa.R b/R/TOXSWA_cwa.R index 81df85f..eacd58f 100644 --- a/R/TOXSWA_cwa.R +++ b/R/TOXSWA_cwa.R @@ -129,7 +129,13 @@ plot.TOXSWA_cwa <- function(x, time_column = c("datetime", "t", "t_firstjan", "t t_rel_to_max = "Time relative to maximum concentration [days]") } if (identical(ylab, "default")) { - ylab = paste( ifelse(total, "Total concentration", "Concentration"), "[\u03bcg/L]") + # Use LateX if the current plotting device is tikz + if (names(dev.cur()) == "tikz output") { + ylab = paste( ifelse(total, "Total concentration", "Concentration"), "[$\\mu$g/L]") + } else { + conc_string <- ifelse(total, "Total concentration", "Concentration") + ylab = bquote(.(conc_string) ~ group("[", mu*g/L, "]")) + } } if (add) { lines(plot_data, xlab = xlab, ylab = ylab, ...) diff --git a/build.log b/build.log index 543134b..107b3ae 100644 --- a/build.log +++ b/build.log @@ -1,10 +1,10 @@ * checking for file ‘./DESCRIPTION’ ... OK * preparing ‘pfm’: * checking DESCRIPTION meta-information ... OK -Warnung: /tmp/RtmpPy0RQl/Rbuild17321b2b74b/pfm/man/TOXSWA_cwa.Rd:29: unknown macro '\u00B5g' -Warnung: /tmp/RtmpPy0RQl/Rbuild17321b2b74b/pfm/man/TOXSWA_cwa.Rd:29: unknown macro '\u00B5g' -Warnung: /tmp/RtmpPy0RQl/Rbuild17321b2b74b/pfm/man/TOXSWA_cwa.Rd:38: unknown macro '\u00B5g' -Warnung: /tmp/RtmpPy0RQl/Rbuild17321b2b74b/pfm/man/read.TOXSWA_cwa.Rd:33: unknown macro '\u00B5g' +Warnung: /tmp/Rtmp1wb3oS/Rbuild6f0542d0d193/pfm/man/TOXSWA_cwa.Rd:29: unknown macro '\u00B5g' +Warnung: /tmp/Rtmp1wb3oS/Rbuild6f0542d0d193/pfm/man/TOXSWA_cwa.Rd:29: unknown macro '\u00B5g' +Warnung: /tmp/Rtmp1wb3oS/Rbuild6f0542d0d193/pfm/man/TOXSWA_cwa.Rd:38: unknown macro '\u00B5g' +Warnung: /tmp/Rtmp1wb3oS/Rbuild6f0542d0d193/pfm/man/read.TOXSWA_cwa.Rd:33: unknown macro '\u00B5g' * checking for LF line-endings in source and make files and shell scripts * checking for empty or unneeded directories * looking to see if a ‘data/datalist’ file should be added -- cgit v1.2.1