Skip to content

Enhance Van Krevelen and DBE plots with all-class view#31

Open
robertyoung3 wants to merge 1 commit intoEMSL-Computing:masterfrom
robertyoung3:feature/plot-enhancements
Open

Enhance Van Krevelen and DBE plots with all-class view#31
robertyoung3 wants to merge 1 commit intoEMSL-Computing:masterfrom
robertyoung3:feature/plot-enhancements

Conversation

@robertyoung3
Copy link

Summary

  • Make classe parameter optional in plot_van_krevelen() and plot_dbe_vs_carbon_number() — when omitted, plots all assigned classes using existing atoms_ratio_all/carbon_number_all/dbe_all helper methods
  • Add log_abundance parameter for log10 color scaling (useful for high dynamic range mass spec data)
  • Add alpha parameter for configurable point transparency
  • Add abundance-based z-ordering so higher values render on top
  • Add colorbars and grid lines for readability
  • Fully backward-compatible: existing plot_van_krevelen("O2") calls work unchanged

Test plan

  • Verify plot_van_krevelen("O2") still works (single class, backward compat)
  • Verify plot_van_krevelen() plots all assigned classes
  • Verify plot_van_krevelen(log_abundance=True) applies log10 scaling
  • Verify plot_dbe_vs_carbon_number() works with same parameter options
  • Verify colorbar appears and labels correctly for both regular and log modes

🤖 Generated with Claude Code

Make classe parameter optional in plot_van_krevelen() and
plot_dbe_vs_carbon_number(). When omitted, plots all assigned
classes using existing atoms_ratio_all/carbon_number_all/dbe_all
helper methods.

New parameters:
- log_abundance: log10 color scaling for high dynamic range data
- alpha: configurable point transparency

Also adds abundance-based z-ordering (higher values on top),
colorbars, and grid lines. Fully backward-compatible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kheal
Copy link
Collaborator

kheal commented Mar 3, 2026

@robertyoung3; this seems pretty interesting - can you add some before/after examples (with code and figures) to the PR for easier review? Ideally using some of the test data shipped. This functionality would also be good to be integrated into one of the tests for CI/CD (see tests/ folder).

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.

2 participants