Skip to content
This repository has been archived by the owner on Jan 9, 2021. It is now read-only.

Commit

Permalink
v0.14.0; cleanup altair charts rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
spascou committed Jul 8, 2020
1 parent 0a297ff commit b6b4ab9
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 1,742 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,3 @@ dmypy.json
examples/datafiles/*
# Plots
examples/plots/*

node_modules/
15 changes: 3 additions & 12 deletions examples/generate_shot_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import Dict, List, Optional

import altair
from altair_saver import save

from ps2_analysis.fire_groups.data_files import (
update_data_files as update_fire_groups_data_files,
Expand Down Expand Up @@ -46,16 +45,8 @@

for fire_mode in fire_group.fire_modes:

chart = fire_mode.generate_altair_simulation(
fire_mode.generate_altair_simulation(
shots=fire_mode.max_consecutive_shots, runs=10, recentering=False
)

save(
chart,
f"{weapon.slug}_{fire_group.fire_group_id}_{fire_mode.fire_mode_id}.png",
)

save(
chart,
f"{weapon.slug}_{fire_group.fire_group_id}_{fire_mode.fire_mode_id}.svg",
).save(
f"{weapon.slug}_{fire_group.fire_group_id}_{fire_mode.fire_mode_id}.html"
)
Loading

0 comments on commit b6b4ab9

Please sign in to comment.