[quote]It took me a while to find out when it happens. I attach the script.
It seems, that the frame is drawed, when I modify axis titles after the function is drawed.
This is important, when I do something like TF2 tf = (TF2)f->DrawCopy(“glsurf2”);
and than operate on tf to get title etc. Important when drawing the same function, but slightly modified, in two pads.[/quote]
Yes, I can confirm the frame appears It’s not from GL however (though it’s done by TGLPadPainter).
[quote=“LeWhoo”]It took me a while to find out when it happens. I attach the script.
It seems, that the frame is drawed, when I modify axis titles after the function is drawed.
This is important, when I do something like TF2 tf = (TF2)f->DrawCopy(“glsurf2”);
and than operate on tf to get title etc. Important when drawing the same function, but slightly modified, in two pads.[/quote]
Ok, now try to call SetTitle before Draw(“glsurf”), this can help.
With DrawClone I do not get axis title at all. I can ofcourse do TF2 tf = (TF2)f->DrawClone(“glsurf2”) and than work on tf, but it makes the frame appear…
That’s the only way I know to draw the function into one pad, modify it and draw modified into the second pad, preserving the first version of the function in the first pad… Is there any better way?
With second TF2 it is another topic I think I know I can make a second TF2 from a scratch, but I decided to go a simpler way - copy constructor. However, the things I perform on the new object apply to the first object. Is it how it is supposed to be? I attach a sample. 1_test_frame.C (754 Bytes)
I want to draw a TF2 with a title1 and parameter_1=0 in gpad1. Than I want to draw same TF2 with a title2 and parameter_1=-1 in gpad2. Than print to file and get everything ok
No, it is not a bug. You must undesrtand that each object drawn in a pad has attributes.
If you modify the attributes and the same object is drawn into several pads, you can expect side-effects. This is the raeson why, in general, you should make a copy of the object
with its current attributes if you want to draw the object again with different attributes.