Skip to content
Snippets Groups Projects
Commit a6f5b3bd authored by Alán Muñoz's avatar Alán Muñoz
Browse files

feat(imageviewer): add visualisation options

parent 2d3cdabb
No related branches found
No related tags found
No related merge requests found
...@@ -357,23 +357,52 @@ class remoteImageViewer: ...@@ -357,23 +357,52 @@ class remoteImageViewer:
) )
custom_imshow( custom_imshow(
tiled_imgs["cell_labels"], tiled_imgs["cell_labels"],
cmap="Set1", cmap=sns.color_palette("Paired", as_cmap=True),
**lbl_plot_kwargs, **lbl_plot_kwargs,
) )
plt.yticks(
ticks=[ if remove_axis == True:
(i * self.tiler.tile_size * nrows) plt.axis("off")
+ self.tiler.tile_size * nrows / 2 elif remove_axis == "x":
for i in range(len(channels)) plt.tick_params(
], axis="x",
labels=channel_labels, which="both",
) bottom=False,
plt.xticks( top=False,
ticks=[self.tiler.tile_size * (i + 0.5) for i in range(ncols)], labelbottom=False,
labels=["+ {} ".format(i) for i in range(ncols)], )
)
plt.xlabel("Additional time-points") if remove_axis != "True":
plt.show() plt.yticks(
ticks=[
(i * self.tiler.tile_size * nrows)
+ self.tiler.tile_size * nrows / 2
for i in range(len(channels))
],
labels=channel_labels,
)
if not remove_axis:
xlabels = (
["+ {} ".format(i) for i in range(ncols)]
if nrows > 1
else list(trange)
)
plt.xlabel("Time-point")
plt.xticks(
ticks=[self.tiler.tile_size * (i + 0.5) for i in range(ncols)],
labels=xlabels,
)
if not np.any(out):
print("ImageViewer:Warning:No cell outlines found")
if savefile:
plt.savefig(savefile, bbox_inches="tight", dpi=300)
plt.close()
else:
plt.show()
# def plot_labelled_trap( # def plot_labelled_trap(
# self, # self,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment