Skip to content

Commit

Permalink
fix dimension bug in plot_images.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Henley13 committed Jul 1, 2020
1 parent 553fadf commit 1e53812
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bigfish/plot/plot_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,15 +775,15 @@ def plot_cell(ndim, cell_coord=None, nuc_coord=None, rna_coord=None,
Mask of the cell.
nuc_mask : np.ndarray, np.uint
Mask of the nucleus.
title : str
title : str or None
Title of the image.
remove_frame : bool
Remove axes and frame.
rescale : bool
Rescale pixel values of the image (made by default in matplotlib).
framesize : tuple
Size of the frame used to plot with 'plt.figure(figsize=framesize)'.
path_output : str
path_output : str or None
Path to save the image (without extension).
ext : str or List[str]
Extension used to save the plot. If it is a list of strings, the plot
Expand Down Expand Up @@ -860,8 +860,8 @@ def plot_cell(ndim, cell_coord=None, nuc_coord=None, rna_coord=None,
ax[1].scatter(rna_coord[:, ndim - 1], rna_coord[:, ndim - 2],
s=25, c="firebrick", marker=".")
if foci_coord is not None:
for (_, y, x, nb_rna, _) in foci_coord:
ax[1].text(x + 5, y - 5, str(nb_rna),
for foci in foci_coord:
ax[1].text(foci[ndim-1] + 5, foci[ndim-2] - 5, str(foci[ndim]),
color="darkorange", size=20)
# case where we know which rna belong to a foci
if rna_coord.shape[1] == ndim + 1:
Expand Down Expand Up @@ -913,8 +913,8 @@ def plot_cell(ndim, cell_coord=None, nuc_coord=None, rna_coord=None,
plt.scatter(rna_coord[:, ndim - 1], rna_coord[:, ndim - 2],
s=25, c="firebrick", marker=".")
if foci_coord is not None:
for (_, y, x, nb_rna, _) in foci_coord:
plt.text(x + 5, y - 5, str(nb_rna),
for foci in foci_coord:
plt.text(foci[ndim-1] + 5, foci[ndim-2] - 5, str(foci[ndim]),
color="darkorange", size=20)
# case where we know which rna belong to a foci
if rna_coord.shape[1] == ndim + 1:
Expand Down

0 comments on commit 1e53812

Please sign in to comment.