Skip to content

Commit

Permalink
add genelabel rotation (customize x and y for rotation with angle 0)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tong-Chen committed Nov 22, 2023
1 parent 42f0cde commit eef8646
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion jcvi/graphics/synteny.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def __init__(
loc_label=True,
gene_labels: Optional[set] = None,
genelabelsize=0,
genelabelrotation=25,
pad=0.05,
vpad=0.015,
extra_features=None,
Expand Down Expand Up @@ -280,7 +281,7 @@ def __init__(
y + height / 2 + genelabelsize * vpad / 3,
markup(gene_name),
size=genelabelsize,
rotation=25,
rotation=genelabelrotation,
ha="left",
va="center",
color="lightslategray",
Expand Down Expand Up @@ -602,6 +603,13 @@ def main():
+ "However, plot may appear visually crowded. "
+ "Reasonably good values are 2 to 6 [Default: disabled]",
)
p.add_option(
"--genelabelrotation",
default=25,
type="int",
help="Rotate gene labels at this angle (anti-clockwise), useful for debugging. "
+ "[Default: 25]",
)
p.add_option(
"--scalebar",
default=False,
Expand Down Expand Up @@ -650,6 +658,7 @@ def main():
extra_features=opts.extra,
gene_labels=gene_labels,
genelabelsize=opts.genelabelsize,
genelabelrotation=opts.genelabelrotation,
scalebar=opts.scalebar,
shadestyle=opts.shadestyle,
glyphstyle=opts.glyphstyle,
Expand Down

0 comments on commit eef8646

Please sign in to comment.