Conversation
| 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] |
There was a problem hiding this comment.
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 😄
There was a problem hiding this comment.
Hey,
thanks for your comment. I changed the code and its now cleaner. Fastplotlib is a cool and fast lib!
There was a problem hiding this comment.
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):
...There was a problem hiding this comment.
Good catch, also changed. Thx!
No description provided.