Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To bold the base #52

Open
Sameerpython opened this issue Jan 10, 2021 · 4 comments
Open

To bold the base #52

Sameerpython opened this issue Jan 10, 2021 · 4 comments

Comments

@Sameerpython
Copy link

Hi,

How to bold or increase the text size for the sequence position number
graphic_record_defined_by_hand

Thanks!

@veghp
Copy link
Member

veghp commented Jan 11, 2021

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

@Sameerpython
Copy link
Author

Thanks veghp!!

@Sameerpython
Copy link
Author

Hi Veghp,

How do i increase the fontsize of the feature label. for example: small feature, Gene1 with a very long name.

Thanks!

@veghp
Copy link
Member

veghp commented Jan 12, 2021

Hi, not sure which is the best approach, but the options for changing the font size are

  1. using rc parameters as shown above (see matplotlib documentation or this question for details)
  2. change the font size in the GraphicFeature object's Matplotlib fontdict parameter
  3. change the matplotlib object (example)
  4. if you want something custom for publication, there is the option of saving into a file manually adjusting as mentioned in Vertical Plot #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants