It seems that whenever I try to draw
ViewField to a same TCanvas there will only be two of them. It works fine if I try any combinations of two of them. I tried the Example
wire2d in Elmer and only get the view of geometry and drift line, also in my own code the same thing happens.
I think @hschindl can help.
wire2d example it works for me with the attached slightly modified version of the program.
wire2d.cc (3.3 KB)
But it may indeed not work out of the box in other situations. If you have another example where it doesn’t work, please post a minimal working version and I’ll take a look…
Thank you, here is the one, I believe I made some mistake to cause this problem…
xt_minimal.zip (25.9 KB)
By default, each
View... object uses its own canvas. You need to set the canvas to be painted on explicitly (using the method
SetCanvas) if you want to combine multiple plots on the same canvas.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.