Alignement of keys with subscripts in matplotlib -


i trying better control on text in table.

in following minimal example keys of table a_c, a_c , abc. in first column , a_c in second column not aligned correctly in key of first column. instead, subscript c in first key aligned in second key, creating bad visual effect , lifting keys respect 1 another:

import matplotlib.pyplot plt  import numpy np matplotlib import rc  rc('text', usetex=true)  col_labels=[r'a \textbf{a}\boldmath$_c$',r'\textbf{a}',r'\textbf{abc}'] row_labels=[r'\textbf{a}',r'\textbf{b}',r'\textbf{abc}'] table_vals=[['-','-','-'],['-','-','-'],['-','-','-']] the_table = plt.table(celltext=table_vals,               rowlabels=row_labels,               collabels=col_labels,               loc='center',  colwidths = [0.1, 0.1, 0.1] , cellloc='bottom') the_table.scale(1,3.5) the_table.set_fontsize(44) plt.show() 

how can text aligned differently?


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -