Skip to content

Add documentation for saving TCanvas and TPad (reference and manual) #9176

@ynikitenko

Description

@ynikitenko

Explain what you would like to see improved

I used TCanvas::SaveAs (which is a virtual function from its parent, TPad::SaveAs) to write canvases to files.
This function has two arguments

SaveAs(const char *filename="", Option_t *option="")

however, there is absolutely no documentation what the "option" could be. I read docs for TCanvas, TPad, TObject and searched on google; finally, I read the source code and saw that the "option" was not used at all.

As a side note, when I read the manual's section on graphics, I found that it doesn't discuss saving canvases, which is a pity, because ROOT IO section also deals with very different things.

Optional: share how it could be improved

  • write that the option argument has no effect for TCanvas and TPad ::SaveAs (add this information to the method's documentation).
  • maybe refer to TPad::Print if one wants to use more options.
  • maybe add to the manual's chapter on Graphics a small section how to write canvases/pads to files.

Setup

  1. Master branch of the ROOT code

Additional context

If I understand correctly, TPad::Print method is the preferred and the most powerful one, while SaveAs is just for unification with TObject (probably it should be also mentioned in these method's docs, if this is true).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions