Present/Save Interactive Plot for Publication in .html
,.pdf
or .docx
Source: R/plot_EPR_present_interact.R
plot_EPR_present_interact.Rd
Add the interactive plots (see plot_EPR_Specs2D_interact
or plot_EPR_Specs3D_interact
)
to various document formats like .html
, .pdf
or .docx
. Function is based on the
saveWidget
as well as on the webshot
with the help
of knitr package functions. Depending on the output format, plot is saved
in working/actual directory either as .html
or as .png
.
The file name inherits the name of the object/variable (see argument p
and example). Afterwards, during
the R markdown or Quarto
processing, the image is automatically attached to the document in the above-described format. Therefore, this function is quite
handy in interactive notebooks (such as .Rmd
or .qmd
, please also consult
the create_qmdReport_proj
function).
Value
Interactive plot format corresponding to that of the output document. If the desired document
format \(\equiv\) .html
, interactive plotly graph is saved in working/actual directory
in the same format. Otherwise, for .pdf
and .docx
it is saved as .png
bitmap with the resolution of size.with
\(\cdot\)res.ppi
x
size.height
\(\cdot\)res.ppi
.
See also
Other Visualizations and Graphics:
draw_molecule_by_rcdk()
,
plot_EPR_Specs()
,
plot_EPR_Specs2D_interact()
,
plot_EPR_Specs3D_interact()
,
plot_EPR_Specs_integ()
,
plot_labels_xyz()
,
plot_layout2D_interact()
,
plot_theme_In_ticks()
,
plot_theme_NoY_ticks()
,
plot_theme_Out_ticks()
,
present_EPR_Sim_Spec()
Examples
if (FALSE) { # \dontrun{
## plotting EPR spectrum of verdazyl radical (`verdazyl.rad.data`),
## where the actual plot is stored under
## the `verdazyl.epr.plot.interact` variable name
verdazyl.epr.plot.interact <-
plot_EPR_Specs2D_interact(data.spectra = verdazyl.rad.data)
#
## afterwards, it is automatically transformed and attached
## to document with the desired format by `knitr`
plot_EPR_present_interact(verdazyl.epr.plot.interact)
#
## remaining image files are stored in the working directory
} # }