All qgraph functions have the option to add the DoNotPlot argument in there (because this is an existing argument so can be in dots). So I removed it from the args, and also adjusted the code such that:
1: In all cases the functions return the plot, but the return value does not plot again. If DoNotPlot = TRUE, it is returned and not plotted.
2: if DoNotPlot is false (or absent), it is plotted and afterwards returned as invisible object.
All qgraph functions have the option to add the DoNotPlot argument in there (because this is an existing argument so can be in dots). So I removed it from the args, and also adjusted the code such that: 1: In all cases the functions return the plot, but the return value does not plot again. If DoNotPlot = TRUE, it is returned and not plotted. 2: if DoNotPlot is false (or absent), it is plotted and afterwards returned as invisible object.