Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6028367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:43:46+00:00 2026-05-23T04:43:46+00:00

I am trying to create a graph and save it as an image. I

  • 0

I am trying to create a graph and save it as an image. I am required to use ROOT. I created the graph with

TGraph graph = TGraph(xvect, yvect);

but now I’m stuck on how to get that saved as a png (or other image format). I’m using a linux machine if that makes a difference. Also, if anyone knows link to the documentation that describes the method for writing the graph to an image file, I could figure it out myself from there, but I have been unsuccessful in finding that in the documentation thus far.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:43:47+00:00Added an answer on May 23, 2026 at 4:43 am
    TCanvas*c1 = new TCanvas();
    graph->Draw();
    c1->Print("name.png");
    

    Will certainly work in the cint shell. It may need some fine-tuning to work in compiled code.

    You’ll find all this basic stuff exhaustively covered in the on-line tutorials and HowTos. Also see the documentation in general.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use Highcharts to create a graph similar to what's shown below.
I am trying to create a bar graph using the matplot library but I
I'm trying to create a bipartite graph w/ R's igraph package, but having a
I'm trying to create a horizontal 100% stacked bar graph using HTML and CSS.
Trying to create a user account in a test. But getting a Object reference
I am trying to use do the most simple update query but Doctrine issues
I am currently trying to create graph statistics for jobs in a PBS. I
I'm currently trying to use the core-plot library to graph some data I get
Basically, I know how to create graph data structures and use Dijkstra's algorithm in
I am trying to create data model for a graph with Node and Edge.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.