From: John H. <jdh...@ac...> - 2003-08-26 13:54:10
|
>>>>> "Charles" == Charles Twardy <ct...@ma...> writes: Charles> Yes, I've just started using python2.3, which is almost Charles> certainly the source of the deprecation warnings. Charles> And yes, I had passed an integer to the text label Charles> command. The crash seems a bit harsh, but at least I can Charles> avoid that now. I've added an automatic string conversion in the set ticklabels functionality, so that any object that can be converted to a string with %s will work as an argument to the ticklabels command. Charles> I generated a graph with 8 subplots (histograms). I Charles> wasn't able to use the title command on the subplots, Charles> because the title appeared on top of the plot above Charles> it. And I haven't yet figured out how to give the plot an Charles> overall title. I'm happy for hints if you have the Charles> time. Otherwise I'm fairly happy with what I've got Charles> (titles inside each subplot, via the text command, and no Charles> overall title). I've needed this functionality too. I just followed matlab's design which is to add the title to the current axes. In CVS, I've added a new figure text function to the class API for Figure. The figure text is in relative 0-1 coords (0,0 is lower left; 1,1 is upper right). You can add a title with gcf().text(0.5, 0.95, 'Figure Title', fontsize=12) You can also add text anywhere else you want in figure coordinates with this command (axis text is in data coordinates). In the examples dir in CVS there is a file figtext.py that illustrates this. Perhaps I'll add a new function figtitle to the matlab functional interface since this comes up fairly often. Charles> Thanks! This is great! Your welcome! John Hunter |