DnaFeaturesViewer
DnaFeaturesViewer copied to clipboard
To bold the base
Hi,
How to bold or increase the text size for the sequence position number
Thanks!
One quick way is to set the defaults before plotting:
import matplotlib as mpl
mpl.rc('xtick', labelsize=15)
mpl.rc('font', weight='bold') # this, however, changes all text
Alternatively, if you save your figure, then you can modify it:
ax, _ = record.plot()
ax.set_xticklabels(ax.get_xticklabels(), fontdict={'weight':'bold'}, fontsize=20)
ax.figure
Thanks veghp!!
Hi Veghp,
How do i increase the fontsize of the feature label. for example: small feature, Gene1 with a very long name.
Thanks!
Hi, not sure which is the best approach, but the options for changing the font size are
- using rc parameters as shown above (see matplotlib documentation or this question for details)
- change the font size in the GraphicFeature object's Matplotlib fontdict parameter
- change the matplotlib object (example)
- if you want something custom for publication, there is the option of saving into a file manually adjusting as mentioned in https://github.com/Edinburgh-Genome-Foundry/DnaFeaturesViewer/issues/45