Skip to content

Conversation

@nextroundwinner
Copy link
Owner

No description provided.

@nextroundwinner nextroundwinner merged commit 5ad6a97 into main Apr 28, 2025
1 check passed
@nextroundwinner nextroundwinner deleted the dyscom_bugfixes branch April 28, 2025 20:35
x_pos, y_pos = self._calc_layout_pos(sub_plot_counter, len(channels))
sub_plot = self._figure[y_pos, x_pos]
# setting name here does not work
# sub_plot.name = value[0]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming you want to set the title, in that case you want to do subplot.title = "new title"

name is for the getter, i.e. can access the subplot like: figure["name_here"]. Although titles are set if names are given when creating a Figure you often may want a long descriptive title and a short name for indexing the subplot from the Figure which is why they're separate.

BTW this is a cool usecase, you figured out how to use it with multithreading! I scour github once in a while to see how people are using fastplotlib 😄

Copy link
Owner Author

@nextroundwinner nextroundwinner Apr 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey,

thanks for your comment. I changed the code and its now cleaner. Fastplotlib is a cool and fast lib!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad you like it! BTW Figure is iterable:

I think something like this will go through fig subplots:

for (key, value), subplot in zip(channels.items(), figure):
    ...

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, also changed. Thx!

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

Successfully merging this pull request may close these issues.

3 participants