1

I can position the table at the top of the plot. How do I position the table in an arbitrary position?:

from numpy import pi, sin,cos,exp,tan,log10,abs
from matplotlib.pyplot import *


phi=np.linspace(0,4*pi,1001)
alfa=0.2
beta=0.01
y=sin(phi+alfa*phi*phi)

F1=figure()
ax1=subplot(1,1,1)
ax1.plot(phi,y)
ax1.grid()
subplots_adjust(top=0.8)
celltxt=[[str(s)] for s in [alfa,beta]]
data_table = table(cellText=celltxt,rowLabels=['alfa','beta'], colWidths = [0.1]*3, loc='top')

show()

thanks ilan

Max Leske
  • 5,007
  • 6
  • 42
  • 54
ilan
  • 123
  • 1
  • 7
  • possible duplicate of [How can I place a table on a plot in Matplotlib?](http://stackoverflow.com/questions/8524401/how-can-i-place-a-table-on-a-plot-in-matplotlib) - especially the update to the accepted answer should be useful. Also, take a look at [Matplotlib Table Formatting](http://stackoverflow.com/questions/9932072/matplotlib-table-formatting) – Schorsch Dec 05 '14 at 16:20
  • Unfortunately that eference does not help me. I am trying to figure out how to place the table in an exact location , for exaple at [x,y]=0.1,0.8. loc='top left' is not precise enough – ilan Dec 06 '14 at 06:51

0 Answers0