Skip to content
Snippets Groups Projects
Commit e7630786 authored by Sebastian Henz's avatar Sebastian Henz
Browse files

Resolve line thickness weirdness, closes #7

parent c074b343
No related branches found
No related tags found
1 merge request!19Develop
......@@ -4,3 +4,4 @@
.Ruserdata
Notizen.md
*.png
......@@ -52,8 +52,8 @@ plot_effect <- function(model,
xlab = xlab,
ylab = ylab,
xaxt = "n",
bty = "L",
las = 1
las = 1,
bty = "L"
)
points(
......@@ -129,8 +129,13 @@ plot_effect <- function(model,
}
}
axis(1, at = log_ticks$major, labels = log_ticks$major_labels)
axis(1, at = log_ticks$minor, labels = FALSE, tcl = -0.25)
# The setting of col = NA and col.ticks = par("fg") is to prevent ugly line
# thickness issues when plotting as a png with type = "cairo" and at a low
# resolution.
axis(1, at = log_ticks$major, labels = log_ticks$major_labels,
col = NA, col.ticks = par("fg"))
axis(1, at = log_ticks$minor, labels = FALSE, tcl = -0.25,
col = NA, col.ticks = par("fg"))
plotrix::axis.break(1, breakpos = temp$axis_break_conc)
if (show_legend) {
......
......@@ -36,7 +36,6 @@ plot_stress <- function(model,
temp <- adjust_smooth_concentrations(model)
curves <- temp$curves
axis_break_conc <- temp$axis_break_conc
log_ticks <- get_log_ticks(curves$concentration)
concentration <- c(curves$concentration[1], model$args$concentration[-1])
......@@ -138,9 +137,14 @@ plot_stress <- function(model,
}
}
axis(1, at = log_ticks$major, labels = log_ticks$major_labels)
axis(1, at = log_ticks$minor, labels = FALSE, tcl = -0.25)
plotrix::axis.break(1, breakpos = axis_break_conc)
# The setting of col = NA and col.ticks = par("fg") is to prevent ugly line
# thickness issues when plotting as a png with type = "cairo" and at a low
# resolution.
axis(1, at = log_ticks$major, labels = log_ticks$major_labels,
col = NA, col.ticks = par("fg"))
axis(1, at = log_ticks$minor, labels = FALSE, tcl = -0.25,
col = NA, col.ticks = par("fg"))
plotrix::axis.break(1, breakpos = temp$axis_break_conc)
if (show_legend) {
legend_df <- legend_df[order(legend_df$order), ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment