From: Alan W. I. <ir...@be...> - 2002-05-09 19:04:12
|
OK. I have fixed this problem for the local (to me) python version of plshades which I have been working on as a test case. The trick was to have a pointer zused which is used for the PLplot library calls rather than z. For pltr0 and pltr1, and wrap=0 with pltr2, zused = z, but for pltr2 and wrap=1 or 2, zwrapped is allocated and filled appropriately from z with one row or column wrapped, and zused = zwrapped. Finally, zwrapped is freed again for pltr2 and wrap = 1 or 2. These changes seem to completely fix the bad behaviour noted before. The python test of wrap=2 (with the last theta = 2pi - delta theta) gives an identical result to the C example without wrapping but with the last theta = 2 pi. wrap=1 makes a fairly weird plot (as expected), but the segfault is gone. I am satisfied this is the right approach so I will extend it to plcont and plshade and plshades for the python, tcl, and java front ends. Hopefully, I will get all the changes checked in today. Alan email: ir...@be... phone: 250-727-2902 FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ |