From: John H. <jdh...@ac...> - 2004-03-26 03:22:07
|
>>>>> "Kirk" == Kirk Lamont <k.l...@us...> writes: Kirk> Hey. We are using Matplotlib with Python and C to create Kirk> run time graphs. However, we are having trouble figuring Kirk> out how to get the axes to show up in scientific notation. Kirk> If anyone have some info it would be very much appreciated. Kirk> Thanks If I understand you correctly, you want to use notation like 1.0e-6 on the x and/or y axis tick labels. Is this correct? Having more automated tick labelers is something that has been discussed and will be added in the not-too-distant future. In the mean time you can control them directly ax = subplot(111) plot([1,2,3]) xticks = ax.get_xticks() labels = [ '%1.0e'%val for val in xticks ] ax.set_xticklabels(labels) or you may want to define your own ticks xticks = [1e-6, 2e-6, 3e-6, 4e-6] ax.set_xticks(xticks) labels = [ '%1.0e'%val for val in xticks ] ax.set_xticklabels(labels) Hope this helps, John Hunter |