edits for new plots in rlib.cpp