Skip to content

Commit

Permalink
Revert set_ticks()
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Apr 28, 2024
1 parent 3022cca commit 4a4f99b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 5 additions & 2 deletions jcvi/assembly/hic.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ def heatmap(args):
help="Do not plot breaks (esp. if contigs are small)",
)
opts, args, iopts = p.set_image_options(
args, figsize="11x11", style="white", cmap="coolwarm", format="png", dpi=120
args, figsize="11x11", style="white", cmap="coolwarm", dpi=120
)

if len(args) != 2:
Expand All @@ -740,6 +740,9 @@ def heatmap(args):
contig_size = header["sizes"][contig]
contig_end = contig_start + contig_size
A = A[contig_start:contig_end, contig_start:contig_end]
else:
total_bins = header["total_bins"]
A = A[:total_bins, :total_bins]

# Convert seqids to positions for each group
new_groups = []
Expand Down Expand Up @@ -778,7 +781,7 @@ def heatmap(args):
ax = fig.add_axes((0.05, 0.05, 0.9, 0.9)) # just the heatmap

breaks = list(header["starts"].values())
breaks += [header["total_bins"]] # This is actually discarded
breaks += [total_bins] # This is actually discarded
breaks = sorted(breaks)[1:]
if contig or opts.nobreaks:
breaks = []
Expand Down
2 changes: 0 additions & 2 deletions jcvi/graphics/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,6 @@ def simplify_seqid(seqid):

ax.set_xlim(xlim)
ax.set_ylim((xlim[1], xlim[0])) # Flip the y-axis so the origin is at the top
ax.set_xticks(ax.get_xticks())
ax.set_yticks(ax.get_yticks())
ax.set_xticklabels(ax.get_xticks(), family="Helvetica", color="gray")
ax.set_yticklabels(ax.get_yticks(), family="Helvetica", color="gray", rotation=90)
ax.tick_params(left=True, bottom=True, labelleft=True, labelbottom=True)
Expand Down

0 comments on commit 4a4f99b

Please sign in to comment.