From: Al S. <a.d...@wo...> - 2004-03-08 16:28:20
|
[ I posted this directly to mat...@li... previously, but I didn't see it show up there. Sorry if you got this before. --Al] I found that multi-line ticklabels work fine in normal (hortizontal) mode. However, after a "set(t, 'rotation', 'vertical')" the plot fails as shown below. The plot window pops up, then disappears. System is RH linux 9, matplotlib 0.51, pygtk 2.0.0, Are multi-line labels supported? In vertical mode too? Thanks for your help. -Al Schapira, a.d...@wo... ### This is based upon the "vertical_ticklabels.py" in /examples. [ads@ADS1 py]$ cat vertical_ticklabels.py from matplotlib.matlab import * plot([1,2,3,4], [1,4,9,16]) set(gca(), 'xticks', [1,2,3,4]) t = set(gca(), 'xticklabels', ['Frogs\nOKAY 1', 'Hogs\nFine 2', Bogs\nGOOD 3', 'Slogs']) set(t, 'rotation', 'vertical') # UNCOMMENT THIS to make the above fail show() [ads@ADS1 py]$ python vertical_ticklabels.py The program 'vertical_ticklabels.py' received an X Window System error. This probably reflects a bug in the program. The error was 'BadMatch (invalid parameter attributes)'. (Details: serial 1083 error_code 8 request_code 73 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) |