Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving the fragment m/z value display #4

Closed
lfnothias opened this issue Oct 10, 2019 · 5 comments · Fixed by #51
Closed

Improving the fragment m/z value display #4

lfnothias opened this issue Oct 10, 2019 · 5 comments · Fixed by #51

Comments

@lfnothias
Copy link

  • First view: Enable the toolbox tip by default
  • SVG: Have a user defined value for the m/z intensity threshold.
sdrogers added a commit that referenced this issue Oct 10, 2019
- Added a thresh parameter so the user can define the threshold (relative) for plotting. Default is everything above 0.1 is plotted
- renamed labels_emma method to just labels and deleted old one
- tidied up plot parameter passing into a single dictionary
- Still need to change default tooltip for the interactive plot...
@schymane
Copy link

May also need to auto detect appropriate decimal places from input data (if only 1 dp in input, we should not display 4)

@schymane
Copy link

Also (I'm mobile viewing atm) may need more buffer on y axis so masses don't cross plot border

@bittremieux
Copy link
Collaborator

Y-axis scaling is a bit annoying. I've looked into ways to do it dynamically within spectrum_utils, but that's pretty much impossible because you can't know where the text annotations will end up before painting the figure, and after painting you can't change anything anymore.

In spectrum_utils I use 1.05 as y_max when peaks aren't annotated and 1.15 when they are. To properly fit a 7-digit number (4 decimals) the 1.15 might have to be increased a bit.

@schymane
Copy link

I tend to hard code as well, up to 1.5 for mass annotations and 2.5 if you want formula and structure annotations ...
The basis of the spectra in here were autogenerated, if you want to get an idea. 2.5 may be overkill but does leave lots of space for annotations ...
https://link.springer.com/article/10.1007%2Fs00216-019-01885-0

@sdrogers
Copy link
Collaborator

Could just add parameters for y_min and y_max and let the user tweak if things don't look quite right?

bittremieux pushed a commit that referenced this issue Aug 17, 2021
- Added a thresh parameter so the user can define the threshold (relative) for plotting. Default is everything above 0.1 is plotted
- renamed labels_emma method to just labels and deleted old one
- tidied up plot parameter passing into a single dictionary
- Still need to change default tooltip for the interactive plot...
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 a pull request may close this issue.

4 participants