Reduce size of ROOT TGeo visualization output in notebooks

In such case I need to get your data.
Can you upload such geometry as ROOT file here?

Sure, here it is: single_neuron.root (357.6 KB)

Hi,

I do see difference when using β€œall” option:

http://jsroot.gsi.de/latest/?file=../files/tmp/single_neuron.root&item=biodynamo
http://jsroot.gsi.de/latest/?file=../files/tmp/single_neuron.root&item=biodynamo&opt=all

Did you try to zoom in - for me rendering by default zoom factor is not nice:

http://jsroot.gsi.de/latest/?file=../files/tmp/single_neuron.root&item=biodynamo&opt=all;zoom30

You could use β€œall;zoom30” as draw options.
Actually, these options can be used for any TGeoVolume - no need to specify TGeoManager.

Regards,
Sergey

1 Like

What do you mean with:

Actually, these options can be used for any TGeoVolume - no need to specify TGeoManager.

I do the following as you suggested before:

const char *opt = "all";
canvas_->GetListOfPrimitives()->Add(gGeoManager, opt);

This for me does not show all the objects (also zoom30 does not change for me). Did you draw those inside a TCanvas? I cannot tell from your links.

I only mean that you can use again:

canvas_->GetListOfPrimitives()->Add(topVolume, opt);

Strange. I trying with standard notebook demo - both adding topVolume and gGeoManager accept draw options.

In my links I showing functionality of JSROOT - no TCanvas, no iPython Notebook.
Just how options changing the drawings.
But exactly same options you should be able to use in your notebook code with TCanvas.

1 Like

Okay, so it seemed that the call to gGeoManager->GetTopVolume()->Draw() (that I included just for comparison) messed up the call to canvas_->Draw() somehow. Once I removed that, it showed all the objects (thanks to the all option).

Thank you very much for your help Sergey! Now I can finally have nice-looking notebooks :smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.