Skip to content

Live update plot broken on MacOS #21362

@vepadulano

Description

@vepadulano

Check duplicate issues.

  • Checked for duplicates

Description

Updating a plot is broken on MacOS. I assume this worked at some point since we have a tutorial https://root.cern/doc/master/hist007__TH1__liveupdate_8C.html

The same piece of code does not update the plot on MacOS, whereas on Linux the plot is updated (see reproducer below)

Just for reference @linev , plotting with webgraphics correctly updates the plot both on MacOS and Linux but:

  • It is much much slower
  • On MacOS the plotting window didn't open automatically, I had to manually switch the view to the browser window in order to see the plot.

Reproducer

$: root -l live_update.C
std::unique_ptr<TH1D> h;
std::unique_ptr<TCanvas> c;

void live_update()
{
   c = std::make_unique<TCanvas>();
   h = std::make_unique<TH1D>("h", "h", 100, -5, 5);

   h->Draw();
   c->Update();
   for (auto i = 0; i < 1000; i++){
      h->FillRandom("gaus", 10);
      c->Modified();
      c->Update();
   }
}

ROOT version

master

Installation method

build from source

Operating system

MacOS

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Issues

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions