NSLS-II / wishlist

an issue tracker for the big picture
1 stars 0 forks source link

Plotting more than one thing on the same LivePlot graph #122

Closed brunoseivam closed 7 years ago

brunoseivam commented 7 years ago

Hi,

I am not sure if this is a bug, a feature request or me using bluesky incorrectly.

I am trying to plot more than one thing using LivePlot on the same graph. So far I accomplished this by having more than one LivePlot instance subscribed to the scan, but I am not sure this is the proper way to do it. For instance, I don't seem to be able to set the legend correctly, as show by this screenshot:

screenshot from 2016-11-07 16 11 55

My use case is: I have a BPM that has motors. I want to scan the BPM by moving it and plotting all four current readings at the same time.

Is there a more convenient/correct way to do it?

Thanks

tacaswell commented 7 years ago

That looks correct, what version of bluesky are you using?

hhslepicka commented 7 years ago

@tacaswell , I noticed the following: If we send label='A' as kwargs when creating the LivePlot it gets overwritten in here: https://github.com/NSLS-II/bluesky/blob/master/bluesky/callbacks/core.py#L158.

Would it be possible to check whether label is in kwargs before setting the label parameter? I guess that this would also solve @brunoseivam problem.

tacaswell commented 7 years ago

Ah, everything is working as intended. The label_keys kwarg is for extracting information from the runstart (rather than a literal string).

tacaswell commented 7 years ago

One problem with over-riding with a label kwarg is that then the legend loses the scan_id.

hhslepicka commented 7 years ago

@tacaswell does it sound bad if we concatenate the provided label with the scan_id at the beginning?

64 :: A
tacaswell commented 7 years ago

@hhslepicka See NSLS-II/blueksy#609 which gives you both :smiling_imp:

hhslepicka commented 7 years ago

:heart_eyes: