79657708

Date: 2025-06-08 09:31:04
Score: 0.5
Natty:
Report link

(As always, I am being late to the party, but, hey - nobody has answered yet.)

Actually, ggplot's `geom_path` plots correctly the cyclic voltammogram if the the data points are ordered chronologically. Let's take a simulated dataset from the library eChem:

library(eChem)

example1 = simulateCV(e.start = 0, e.switch = -0.5, e.form = -0.25,
mechanism = "E", scan.rate = 1, area = 0.01,
temp = 298, conc.bulk = 1e-3, n = 1, d = 1e-5,
alpha = 0.5, ko = 1, kcf = 0, kcr = 0)

plotCV(list(example1))

This will output the following graph:

enter image description here

The same dataset could be visualised in ggplot as follows:

library(ggplot2)
library(dplyr)

as.data.frame(example1[4:5]) %>%
ggplot(aes(potential,current))+
geom_path(col="blue")+
scale_x_reverse()+
theme_minimal()

enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Glory2Ukraine