Skip to content

[Breaking] Refactor ptable heatmap plotter #157

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

Merged
merged 185 commits into from
Jul 21, 2024
Merged
Changes from 9 commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
9fe3650
comment out heatmap plotter for refactor
DanielYang59 Jun 7, 2024
991f611
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 7, 2024
2875539
group args for refactor
DanielYang59 Jun 7, 2024
1bede8f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 7, 2024
e3c976a
remove None as default
DanielYang59 Jun 7, 2024
ab15a46
Merge branch 'main' into refactor-ptable-heatmap
DanielYang59 Jun 11, 2024
8b1282d
Merge branch 'main' into refactor-ptable-heatmap
DanielYang59 Jun 14, 2024
54cd90d
Merge branch 'main' into refactor-ptable-heatmap
DanielYang59 Jun 21, 2024
d845c2c
Merge branch 'main' into refactor-ptable-heatmap
DanielYang59 Jun 26, 2024
19e3d3e
remove commented out legacy code
DanielYang59 Jun 27, 2024
a15d6ea
fix unsupported default None value for elem_colors
DanielYang59 Jun 27, 2024
3006cbb
add missing start_angle arg
DanielYang59 Jun 27, 2024
97c2fcf
add heatmap child plotter
DanielYang59 Jun 27, 2024
098c8b2
remove Callable type from plot_kwargs
DanielYang59 Jun 27, 2024
012b931
set hide_f_block default to "AUTO"
DanielYang59 Jun 27, 2024
e973e11
docstring tweak
DanielYang59 Jun 27, 2024
8b715ca
add values display functionality
DanielYang59 Jun 27, 2024
d9c0708
add docstring for heatmap plotter
DanielYang59 Jun 28, 2024
109025e
add fences for blocks in docstring
DanielYang59 Jun 28, 2024
7566a73
add log scale preprocessor
DanielYang59 Jun 28, 2024
fd9de14
warning upon illegal log value
DanielYang59 Jun 28, 2024
c7f9fe0
tweak docstring
DanielYang59 Jun 28, 2024
9052cf0
skip ptable heatmap tests
DanielYang59 Jun 28, 2024
d563372
add more comments
DanielYang59 Jun 28, 2024
82f438e
add data sum normalizer
DanielYang59 Jun 28, 2024
b24385d
merge heat_mode and show_values to show_values_mode
DanielYang59 Jun 30, 2024
8950167
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 30, 2024
0e4ab42
change default symbol font to white and bold
DanielYang59 Jun 30, 2024
8d9495f
Merge branch 'refactor-ptable-heatmap' of github.com:DanielYang59/pym…
DanielYang59 Jun 30, 2024
70352fe
make default cbar title font 16 and bold
DanielYang59 Jun 30, 2024
d5ee637
fix missing % sign in percent mode
DanielYang59 Jun 30, 2024
5575b73
rename show_values_mode to values_show_mode
DanielYang59 Jun 30, 2024
8db243f
add tile_colors to store and overwrite tile colors
DanielYang59 Jun 30, 2024
7f3b73d
add values f-string formatter
DanielYang59 Jun 30, 2024
d8e1123
add setting cbar range, need double check overwrite norm
DanielYang59 Jun 30, 2024
017c550
temp save: add tile_size docstring
DanielYang59 Jun 30, 2024
fb63e00
change border color to grey
DanielYang59 Jun 30, 2024
4067ebd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 30, 2024
a427d02
fix value in percent mode
DanielYang59 Jun 30, 2024
19f16c7
remove percentage mode from normalizer
DanielYang59 Jun 30, 2024
6bd8e7c
merge main
DanielYang59 Jul 1, 2024
f066499
fix merge main
DanielYang59 Jul 1, 2024
941c96d
remove TODO tag
DanielYang59 Jul 1, 2024
8a774e5
enable cbar label format in percent mode
DanielYang59 Jul 1, 2024
5bdaebd
WIP: separate label fmt generate as method
DanielYang59 Jul 1, 2024
f78d332
WIP: add sci_notation arg
DanielYang59 Jul 1, 2024
2c076ef
add cbar label sci notation formatter
DanielYang59 Jul 1, 2024
b841af7
fix sci notation in fraction mode
DanielYang59 Jul 1, 2024
eaa0b87
add TODO tag for tests to migrate
DanielYang59 Jul 1, 2024
c32e66f
move get_cbar_label_formatter to utils
DanielYang59 Jul 1, 2024
2d95542
turn off useMathText for consistency with values in tile
DanielYang59 Jul 1, 2024
808f8bc
remove percentage arg
DanielYang59 Jul 1, 2024
312ea5f
add tests for get_cbar_label_formatter
DanielYang59 Jul 1, 2024
ad98cf5
track examples, would remove before merge
DanielYang59 Jul 1, 2024
c1a3287
overwrite add_child_plots method
DanielYang59 Jul 1, 2024
b78d2c9
access colors from tile_colors property
DanielYang59 Jul 1, 2024
a34562a
tiny docstring correction
DanielYang59 Jul 2, 2024
356c84f
Merge branch 'main' into refactor-ptable-heatmap
DanielYang59 Jul 2, 2024
d696f8e
remove accidentally committed test file
DanielYang59 Jul 2, 2024
0fb90bc
simplify sci notation of e+0
DanielYang59 Jul 2, 2024
acfe4ab
SUBOPTIMAL: pass tile_size to subplots figsize
DanielYang59 Jul 2, 2024
95cfc76
WIP, not working: add f-block vertical offset
DanielYang59 Jul 2, 2024
ec336a9
fix wrong arg passing
DanielYang59 Jul 2, 2024
211941b
separate HMapPTableProjector
DanielYang59 Jul 2, 2024
71d9e62
preprocess_ptable_data and downstream funcs now record anomaly
DanielYang59 Jul 2, 2024
1c7eada
remove TODO tag
DanielYang59 Jul 2, 2024
ab6c011
overload preprocess_ptable_data type
DanielYang59 Jul 2, 2024
beb085d
add overwrite_colors generator and unit test
DanielYang59 Jul 2, 2024
2d7d1fe
fix log_scale apply, and return type
DanielYang59 Jul 2, 2024
3856d6b
docstring tweaks
DanielYang59 Jul 2, 2024
ea365f9
In process: migration some of the heatmap tests
DanielYang59 Jul 2, 2024
dca1243
remove TODO tag
DanielYang59 Jul 2, 2024
70a1212
fix mypy errors
DanielYang59 Jul 2, 2024
f80c108
migrate most unit tests
DanielYang59 Jul 2, 2024
7b96203
migrate most unit tests
DanielYang59 Jul 2, 2024
111458a
add overwrite_colors arg
DanielYang59 Jul 3, 2024
80a77e2
add PTableData and unit test, not fully finished
DanielYang59 Jul 4, 2024
db2c25b
add drop_elements method
DanielYang59 Jul 4, 2024
090567d
add unit test for apply method
DanielYang59 Jul 4, 2024
ef02947
move PTableData to ptable and relocate unit tests
DanielYang59 Jul 4, 2024
8524478
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 4, 2024
120c219
add placeholder wrap for from_formulas method
DanielYang59 Jul 4, 2024
107d12e
fix nan replacement when nan and inf coexist
DanielYang59 Jul 4, 2024
744ca9f
fix log scale apply
DanielYang59 Jul 4, 2024
13712df
fix type errors
DanielYang59 Jul 4, 2024
9a172a5
simplify missing_strategy arg name to strategy
DanielYang59 Jul 4, 2024
fc9ac17
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 4, 2024
9ab85f3
Merge branch 'main' into refactor-ptable-heatmap
DanielYang59 Jul 5, 2024
d342634
mark tile_size and f-block offset as WIP
DanielYang59 Jul 5, 2024
2567e24
add text_colors to unify value/symbol colors and fix inconsistency
DanielYang59 Jul 5, 2024
7c0a6ed
fix typo in test and pick_bw_for_contrast allow color as str
DanielYang59 Jul 5, 2024
4fa7eb4
NEED CONFIRM: remove test for color consistency
DanielYang59 Jul 5, 2024
fd5742c
rename text_color to text_colors for consistency
DanielYang59 Jul 5, 2024
b028251
migrate asset maker for ptable-heatmap-atomic-mass
DanielYang59 Jul 5, 2024
bf5ec61
migrate ptable-heatmap-percent
DanielYang59 Jul 5, 2024
61127d1
fix colormap in percent mode
DanielYang59 Jul 5, 2024
f3429f2
fix log scale
DanielYang59 Jul 5, 2024
65188a4
uncommit example figures
DanielYang59 Jul 5, 2024
6877f1b
add back exclude_elem
DanielYang59 Jul 5, 2024
2a32719
minor clean up
DanielYang59 Jul 5, 2024
afaa653
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 5, 2024
f386048
add tests to exclude_elems
DanielYang59 Jul 5, 2024
a28a29f
Merge branch 'refactor-ptable-heatmap' of github.com:DanielYang59/pym…
DanielYang59 Jul 5, 2024
1b092ed
add overwrite_anomalies to handle nan/inf and tests
DanielYang59 Jul 5, 2024
371f31a
remove finished TODO
DanielYang59 Jul 5, 2024
9f5bdda
make exclude_elements in cline
DanielYang59 Jul 6, 2024
b6a042f
fix tile color and value when on_emtpy is show
DanielYang59 Jul 6, 2024
975e577
increate title font size
DanielYang59 Jul 6, 2024
8d85ab6
remove cbar range to be consistent with previous setting
DanielYang59 Jul 6, 2024
51c94dc
Merge branch 'main' into refactor-ptable-heatmap
DanielYang59 Jul 6, 2024
3b59fb2
WIP: migrate ptable_heatmap_ratio
DanielYang59 Jul 6, 2024
773d4a3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 6, 2024
9db9a31
fix arg in other examples
DanielYang59 Jul 6, 2024
9b79591
Merge branch 'refactor-ptable-heatmap' of github.com:DanielYang59/pym…
DanielYang59 Jul 6, 2024
e340482
make overwrite_anomalies in line
DanielYang59 Jul 6, 2024
b93d52b
fix color mapping in log mode
DanielYang59 Jul 6, 2024
4ce830f
update ratios plot
DanielYang59 Jul 6, 2024
89c4f05
optimize norm setter
DanielYang59 Jul 6, 2024
08bd9ee
remove excluded elem to avoid metadata pollution and fix text color
DanielYang59 Jul 6, 2024
01a6d83
fix color mapping in percent/fraction mode
DanielYang59 Jul 6, 2024
a43912e
break into submodules
DanielYang59 Jul 7, 2024
4ea1843
remove debug script
DanielYang59 Jul 7, 2024
2da872b
Revert "break into submodules"
DanielYang59 Jul 7, 2024
94a5c17
WIP: attempt to merge main
DanielYang59 Jul 7, 2024
969fa24
fix merge main
DanielYang59 Jul 7, 2024
9c5f750
split ptable projector
DanielYang59 Jul 7, 2024
d9b87f7
add ratio plot legends
DanielYang59 Jul 7, 2024
980f5c3
fix NaN display in ratio plotter
DanielYang59 Jul 7, 2024
f98fbcb
migrate unit test for ratio plotter
DanielYang59 Jul 7, 2024
f705c63
Merge branch 'main' into refactor-ptable-heatmap
DanielYang59 Jul 8, 2024
bedbc01
Merge branch 'main' into refactor-ptable-heatmap
DanielYang59 Jul 9, 2024
2904d32
condense tile value, color and text_color generation
DanielYang59 Jul 9, 2024
c0999c6
WIP: merge tile symbol, color and value plot into add_heatmap_tiles
DanielYang59 Jul 9, 2024
7bde805
first working version after tile refactor
DanielYang59 Jul 9, 2024
4269511
fix colorbar format
DanielYang59 Jul 9, 2024
6dbabb4
rename args values_xx to value_xx
DanielYang59 Jul 9, 2024
ff2317a
add missing docstrings
DanielYang59 Jul 9, 2024
52bb866
regenerate asset with new implementation
DanielYang59 Jul 9, 2024
9d55705
finish ratio plotter migration
DanielYang59 Jul 9, 2024
f6bb56d
fix wrong import of ptableprojector in unit test
DanielYang59 Jul 9, 2024
fd3a47d
remove HMapPTableProjector into _projectors module
DanielYang59 Jul 9, 2024
f4aecc8
add unit tests for generate_tile_value_colors
DanielYang59 Jul 9, 2024
6bc1d59
fix mypy errors
DanielYang59 Jul 9, 2024
db2b5c9
set NaN default color as lightgrey
DanielYang59 Jul 9, 2024
edf5d30
Merge branch 'main' into refactor-ptable-heatmap
DanielYang59 Jul 10, 2024
f9ce145
add deprecated warning for args
DanielYang59 Jul 10, 2024
b7ffa40
remove inf_color to infty_color for backwards compatibility
DanielYang59 Jul 10, 2024
aa48c3a
add more deprecated args
DanielYang59 Jul 10, 2024
f082ed2
WIP: migrate matbench_dielectric_eda.ipynb
DanielYang59 Jul 10, 2024
6c53d4c
WIP: migrate mprester_ptable.ipynb
DanielYang59 Jul 10, 2024
dd8498a
set default on_empty to show and reset normalizer for values not present
DanielYang59 Jul 10, 2024
34ee706
fix matbench_dielectric_eda ipynb
DanielYang59 Jul 10, 2024
43b0ac4
ptable_heatmap now filter near zero values internally with a warning
DanielYang59 Jul 10, 2024
286ee14
fix value type
DanielYang59 Jul 10, 2024
39e79de
migrate mprester_ptable.ipynb
DanielYang59 Jul 10, 2024
165db24
migrate example boltztrap_mp
DanielYang59 Jul 10, 2024
cc134a0
migrate camd_2022
DanielYang59 Jul 10, 2024
09bd698
set default value_fmt to .0f in log mode to be large-number friendly
DanielYang59 Jul 10, 2024
abed0a0
fix and migrate ricci_carrier_transport
DanielYang59 Jul 10, 2024
92613bd
add debug tag
DanielYang59 Jul 10, 2024
821b3b6
migrate dielectric
DanielYang59 Jul 10, 2024
8c2b7db
migrate expt_gap
DanielYang59 Jul 10, 2024
650adc3
migrate other matbench
DanielYang59 Jul 10, 2024
272b90e
simplify count_elements import
DanielYang59 Jul 10, 2024
4075a48
fix unit test
DanielYang59 Jul 10, 2024
ead5a8c
remove TODO tag
DanielYang59 Jul 10, 2024
5799751
Merge branch 'main' into refactor-ptable-heatmap
DanielYang59 Jul 11, 2024
4acc671
drop not available structure
DanielYang59 Jul 11, 2024
0f9bdc7
add return_type for smoother migration to return figure
DanielYang59 Jul 11, 2024
06bf5a4
reapply value filter for percent mode
DanielYang59 Jul 11, 2024
3995f33
Merge branch 'main' into refactor-ptable-heatmap
DanielYang59 Jul 12, 2024
d43cad7
revert accidental revert during conflict merge
DanielYang59 Jul 12, 2024
37a2470
fix return type in test and add test for return_type
DanielYang59 Jul 12, 2024
0cee7cc
add debug tag
DanielYang59 Jul 12, 2024
6e56c9a
make copy of df
DanielYang59 Jul 12, 2024
c121d11
include ax example in asset
DanielYang59 Jul 12, 2024
3d4d65d
remove ptabledata from_formula method
DanielYang59 Jul 12, 2024
1ff7775
change ptable_matplotlib.py doc str section format # -> ---
janosh Jul 21, 2024
d784a82
rename Literal "AUTO"->"auto" for automatic text color and text forma…
janosh Jul 21, 2024
0684072
df_ptable.atomic_mass->df_ptable[Key.atomic_mass]
janosh Jul 21, 2024
1117617
rename HMapPTableProjector->HeatMapPTableProjector
janosh Jul 21, 2024
34713e8
simplify assert isclose(a, b) -> assert a == b
janosh Jul 21, 2024
a4ae109
decrease filter_near_zero(tol=1e-4->1e-6)
janosh Jul 21, 2024
426e16e
Merge branch 'main' into pr/DanielYang59/157
janosh Jul 21, 2024
9a3940d
add isinstance(self.anomalies, dict) to remove need for typing.cast
janosh Jul 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Loading