vertesy / ggExpress

ggExpress is the fastest way to create, annotate and and save plots in R.
https://vertesy.github.io/ggExpress
GNU General Public License v3.0
4 stars 2 forks source link

Write metadata to image files as MarkdownReports does #4

Closed vertesy closed 1 year ago

vertesy commented 3 years ago
  1. MarkdownReports saves the creating script's name (scriptname) and potentially the author to the title field of the output .pdf files. It was not the case when saving as .png.
  2. I want to implement this is the ggplot based ggExpressDev

Resources

In MarkdownReports:

See title inside ww.dev.copy

 dev.copy2pdf(
      file = ww.FnP_parser(fname_, "pdf"),
      width = w_,
      height = h_,
      title = ww.ttl_field(fname_)
vertesy commented 3 years ago

Great! You can pass on title to save_plot and its safely ignored when saving as png.

xx <- qplot(1)
save_plot(filename = "hello.pdf", plot = xx, title="Metadata")

save_plot(filename = "hello.png", plot = xx, title="Metadata")
vertesy commented 2 years ago

This is not actually implemented.

  1. qqSavesave_plotcowplot::ggsave2 can handle it

  2. we need to call ww.ttl_field("/Users/myplot.jpg")

ww.ttl_field("/Users/myplot.jpg")
vertesy commented 1 year ago

Solved now