Closed c-hoffmann closed 1 year ago
After some more research, I'm not certain about my request any more. Maybe an EMF-export to embed within the Word document would be more helpful than EPS.
Dear Christian, thank you for the suggestion. Given that rMEA works with base R graphics, you don't need fancy functions to achieve your goals. Indeed you can use base R EPS graphing capabilities like that: setEPS() postscript("myPlot.eps") MEAlagplot(mea_ccf, contrast=mea_random_ccf) dev.off()
also most rMEA plotting functions actually pass their parameters to base::plot, so you can override most defaults. For instance if you want to suppress (or change) the title, you can call: MEAlagplot(mea_ccf, contrast=mea_random_ccf, main="") This works as well for xlab, ylab, xlim, ylim, xaxt, bty, col, and possibly other parameters.
Let me know if this is sufficient, or if something else would be needed Johann
On Wed, 17 May 2023 at 09:10, Christian Hoffmann @.***> wrote:
After some more research, I'm not certain about my request any more. Maybe an EMF-export to embed within the Word document https://superuser.com/questions/426405/importing-an-eps-vector-file-to-microsoft-word-without-losing-quality would be more helpful than EPS.
— Reply to this email directly, view it on GitHub https://github.com/kleinbub/rMEA/issues/12#issuecomment-1550868204, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMN63QOCAVVEKJJ2D6JATDXGR2WZANCNFSM6AAAAAAYEUFKHQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Johann R. Kleinbub, PhD University of Padova FISPPA Dep. - Section of Applied Psychology Cell: +39 3495986373 https://unipd.zoom.us/my/kleinbub
Dear Johann, neat - I didn't know about main="", thanks for pointing me to it! I bet there's a similar setting for the subtitle ("% above...")?
As I mentioned before, however, exporting EPS with this method loses the thin / individual lines of the plot. Here's my call:
MEAlagplot(setGroup(MEAs_tot, "Synchrony"), contrast=setGroup(MEAs_tot_rnd, "SUSY"), contrast.alpha = 0, mea.alpha = 0.5, col=c("#000000","#FF0000"), main="")
I thought that it might be because of the transparency, but setting mea.alpha to 0.0 doesn't seem to help.
I looked into it, it has indeed to do with transparency and you almost got it right, but you should set alpha = 1 for the lines you want to keep. Alpha = 1 means full opacity, and alpha = 0 complete transparency. let me know if that fixes it.
About the subtitle that is fixed unfortunately, let me know if that's deal-breaking. (you might have some luck in hiding it with sub="" but it's a hack) Johann
On Wed, 17 May 2023 at 12:32, Christian Hoffmann @.***> wrote:
Dear Johann, neat - I didn't know about main="", thanks for pointing me to it! I bet there's a similar setting for the subtitle ("% above...")?
As I mentioned before, however, exporting EPS with this method loses the thin / individual lines of the plot. Here's my call: MEAlagplot(setGroup(MEAs_tot, "Synchrony"), contrast=setGroup(MEAs_tot_rnd, "SUSY"), contrast.alpha = 0, mea.alpha = 0.5, col=c("#000000","#FF0000"), main="") I thought that it might be because of the transparency, but setting mea.alpha to 0.0 doesn't seem to help.
— Reply to this email directly, view it on GitHub https://github.com/kleinbub/rMEA/issues/12#issuecomment-1551146566, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMN63Q5ZPGWL4KIN2BU2KDXGSSNLANCNFSM6AAAAAAYEUFKHQ . You are receiving this because you commented.Message ID: @.***>
-- Johann R. Kleinbub, PhD University of Padova FISPPA Dep. - Section of Applied Psychology Cell: +39 3495986373 https://unipd.zoom.us/my/kleinbub
actually, I think you can pretty reliably hide the subtitle assigning a high value to argument sub.line, e.g. subline = 100. But margins specification and other graphical parameters are somewhat hardwired. Let me know if you have specific needs.
Thanks so much for your help, Johann!
Just a suggestion (nothing time-critical): The Journal of Nonverbal Behavior (which I assume is one of the main journals of interest for synchrony / rMEA) expects figures as EPS-files (see here). Since MEAlagplot isn't based on ggplot2 (which would have more straightforward ways of exporting EPS), maybe I can interest you in considering an EPS export implementation for your graphics.
Also, the same journal prefers the title ("Cross-correlation...") to not be included in the graphic, so maybe an option to exclude the title at the top would be a good idea?
Sidenote: I tried exporting EPS with example 1 of this walkthrough, but couldn't get usable results. Exporting directly from RStudio works, but loses all the thin individual lag curves in the background, so that didn't work for me either.