added pp-plot subcrate
This commit is contained in:
+5
-1
@@ -2,6 +2,10 @@
|
||||
Cargo.lock
|
||||
/maps
|
||||
output
|
||||
|
||||
/pp-gen/.env
|
||||
/pp-gen/target
|
||||
/pp-gen/output.json
|
||||
/pp-gen/output.json
|
||||
|
||||
/pp-plot/.env
|
||||
/pp-plot/target
|
||||
@@ -6,6 +6,7 @@
|
||||
- [BREAKING] Instead of returning `StarResult`, difficulty calculations now return `{Mode}DifficultyAttributes` and `StarResult` has been renamed to `DifficultyAttributes`.
|
||||
- [BREAKING] Various fields and methods now include `f64` instead of `f32` to stay true to osu!'s original code
|
||||
- added internal binary crate `pp-gen` to calculate difficulty & pp values via `PerformanceCalculator.dll`
|
||||
- added internal binary crate `pp-plot` to plot out differences between `pp-gen`'s output and `rosu-pp` values
|
||||
- osu: Updated up to commit [9fb2402781ad91c197d51aeec716b0000f52c4d1](https://github.com/ppy/osu/commit/9fb2402781ad91c197d51aeec716b0000f52c4d1) (2021-11-12)
|
||||
|
||||
# v0.2.3
|
||||
|
||||
+6
-6
@@ -72,7 +72,7 @@ fn main() {
|
||||
dotenv::dotenv().expect("failed to read .env file");
|
||||
|
||||
Runtime::new()
|
||||
.expect("failed to create runtiem")
|
||||
.expect("failed to create runtime")
|
||||
.block_on(async_main());
|
||||
}
|
||||
|
||||
@@ -249,11 +249,11 @@ enum Error {
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
Error::EmptyFileName => f.write_str("empty file name"),
|
||||
Error::Io(_) => f.write_str("io error"),
|
||||
Error::ParseId(s) => write!(f, "failed to parse map id from `{}`", s),
|
||||
Error::ParseMap(_) => f.write_str("failed to parse map"),
|
||||
Error::Serde(_) => f.write_str("failed to deserialize"),
|
||||
Self::EmptyFileName => f.write_str("empty file name"),
|
||||
Self::Io(_) => f.write_str("io error"),
|
||||
Self::ParseId(s) => write!(f, "failed to parse map id from `{}`", s),
|
||||
Self::ParseMap(_) => f.write_str("failed to parse map"),
|
||||
Self::Serde(_) => f.write_str("failed to deserialize"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
MAP_PATH="path/to/.osu/files"
|
||||
@@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "pp-plot"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
dotenv = { version = "0.15", default-features = false }
|
||||
futures = { version = "0.3", default-features = false, features = ["std"] }
|
||||
plotters = { version = "0.3" }
|
||||
rosu-pp = { path = "..", features = ["async_tokio"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = { version = "1.0" }
|
||||
tokio = { version = "1.0", default-features = false, features = ["fs", "rt-multi-thread"] }
|
||||
@@ -0,0 +1,9 @@
|
||||
# pp-gen
|
||||
|
||||
Small script to plot value differences between `rosu-pp`'s performance attributes and `pp-gen`'s `output.json`.
|
||||
|
||||
### How to use
|
||||
|
||||
- Rename `.env.example` to `.env` and put proper values for its variables:
|
||||
- `MAP_PATH` is the path to the folder containing a bunch of `{map_id}.osu` files
|
||||
- Run `cargo run --release`. The program will read the file at `../pp-gen/output.json`, calculate `rosu-pp` values, and plot the differences in the files`{mode}_accuracy.svg`.
|
||||
@@ -0,0 +1,174 @@
|
||||
<svg width="1024" height="256" viewBox="0 0 1024 256" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0" y="0" width="1023" height="255" opacity="1" fill="#FFFFFF" stroke="none"/>
|
||||
<text x="512" y="10" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="16.129032258064516" opacity="1" fill="#000000">
|
||||
fruits (98 data points)
|
||||
</text>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="104" y1="210" x2="104" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="114" y1="210" x2="114" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="124" y1="210" x2="124" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="133" y1="210" x2="133" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="143" y1="210" x2="143" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="153" y1="210" x2="153" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="162" y1="210" x2="162" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="172" y1="210" x2="172" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="182" y1="210" x2="182" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="191" y1="210" x2="191" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="201" y1="210" x2="201" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="211" y1="210" x2="211" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="221" y1="210" x2="221" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="230" y1="210" x2="230" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="240" y1="210" x2="240" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="250" y1="210" x2="250" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="259" y1="210" x2="259" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="269" y1="210" x2="269" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="279" y1="210" x2="279" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="288" y1="210" x2="288" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="298" y1="210" x2="298" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="308" y1="210" x2="308" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="317" y1="210" x2="317" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="327" y1="210" x2="327" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="337" y1="210" x2="337" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="347" y1="210" x2="347" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="356" y1="210" x2="356" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="366" y1="210" x2="366" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="376" y1="210" x2="376" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="385" y1="210" x2="385" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="395" y1="210" x2="395" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="405" y1="210" x2="405" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="414" y1="210" x2="414" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="424" y1="210" x2="424" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="434" y1="210" x2="434" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="444" y1="210" x2="444" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="453" y1="210" x2="453" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="463" y1="210" x2="463" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="473" y1="210" x2="473" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="482" y1="210" x2="482" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="492" y1="210" x2="492" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="502" y1="210" x2="502" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="511" y1="210" x2="511" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="521" y1="210" x2="521" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="531" y1="210" x2="531" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="540" y1="210" x2="540" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="550" y1="210" x2="550" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="560" y1="210" x2="560" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="570" y1="210" x2="570" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="579" y1="210" x2="579" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="589" y1="210" x2="589" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="599" y1="210" x2="599" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="608" y1="210" x2="608" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="618" y1="210" x2="618" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="628" y1="210" x2="628" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="637" y1="210" x2="637" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="647" y1="210" x2="647" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="657" y1="210" x2="657" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="667" y1="210" x2="667" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="676" y1="210" x2="676" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="686" y1="210" x2="686" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="696" y1="210" x2="696" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="705" y1="210" x2="705" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="715" y1="210" x2="715" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="725" y1="210" x2="725" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="734" y1="210" x2="734" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="744" y1="210" x2="744" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="754" y1="210" x2="754" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="763" y1="210" x2="763" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="773" y1="210" x2="773" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="783" y1="210" x2="783" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="793" y1="210" x2="793" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="802" y1="210" x2="802" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="812" y1="210" x2="812" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="822" y1="210" x2="822" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="831" y1="210" x2="831" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="841" y1="210" x2="841" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="851" y1="210" x2="851" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="860" y1="210" x2="860" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="870" y1="210" x2="870" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="880" y1="210" x2="880" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="890" y1="210" x2="890" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="899" y1="210" x2="899" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="909" y1="210" x2="909" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="919" y1="210" x2="919" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="928" y1="210" x2="928" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="938" y1="210" x2="938" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="948" y1="210" x2="948" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="957" y1="210" x2="957" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="967" y1="210" x2="967" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="977" y1="210" x2="977" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="986" y1="210" x2="986" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="996" y1="210" x2="996" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="1006" y1="210" x2="1006" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="165" x2="1009" y2="165"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="75" x2="1009" y2="75"/>
|
||||
<text x="552" y="251" dy="-0.5ex" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
Away from actual value
|
||||
</text>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="191" y1="210" x2="191" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="288" y1="210" x2="288" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="385" y1="210" x2="385" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="482" y1="210" x2="482" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="579" y1="210" x2="579" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="676" y1="210" x2="676" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="773" y1="210" x2="773" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="870" y1="210" x2="870" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="967" y1="210" x2="967" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="165" x2="1009" y2="165"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="75" x2="1009" y2="75"/>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="94,31 94,211 "/>
|
||||
<text x="85" y="165" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"pp"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,165 94,165 "/>
|
||||
<text x="85" y="75" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"stars"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,75 94,75 "/>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="95,211 1009,211 "/>
|
||||
<text x="191" y="221" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.005
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="191,211 191,216 "/>
|
||||
<text x="288" y="221" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.01
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="288,211 288,216 "/>
|
||||
<text x="385" y="221" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.015
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="385,211 385,216 "/>
|
||||
<text x="482" y="221" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.02
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="482,211 482,216 "/>
|
||||
<text x="579" y="221" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.025
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="579,211 579,216 "/>
|
||||
<text x="676" y="221" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.03
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="676,211 676,216 "/>
|
||||
<text x="773" y="221" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.035
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="773,211 773,216 "/>
|
||||
<text x="870" y="221" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.04
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="870,211 870,216 "/>
|
||||
<text x="967" y="221" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.045
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="967,211 967,216 "/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="160" x2="95" y2="170"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="165" x2="100" y2="165"/>
|
||||
<rect x="100" y="155" width="303" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="133" y1="155" x2="133" y2="175"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="403" y1="165" x2="856" y2="165"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="856" y1="160" x2="856" y2="170"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="70" x2="95" y2="80"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="75" x2="95" y2="75"/>
|
||||
<rect x="95" y="65" width="2" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="65" x2="95" y2="85"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="97" y1="75" x2="101" y2="75"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="101" y1="70" x2="101" y2="80"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,162 @@
|
||||
<svg width="1024" height="512" viewBox="0 0 1024 512" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0" y="0" width="1023" height="511" opacity="1" fill="#FFFFFF" stroke="none"/>
|
||||
<text x="512" y="10" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="16.129032258064516" opacity="1" fill="#000000">
|
||||
mania (168 data points)
|
||||
</text>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="112" y1="466" x2="112" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="129" y1="466" x2="129" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="146" y1="466" x2="146" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="163" y1="466" x2="163" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="180" y1="466" x2="180" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="197" y1="466" x2="197" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="215" y1="466" x2="215" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="232" y1="466" x2="232" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="249" y1="466" x2="249" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="266" y1="466" x2="266" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="283" y1="466" x2="283" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="300" y1="466" x2="300" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="317" y1="466" x2="317" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="335" y1="466" x2="335" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="352" y1="466" x2="352" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="369" y1="466" x2="369" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="386" y1="466" x2="386" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="403" y1="466" x2="403" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="420" y1="466" x2="420" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="438" y1="466" x2="438" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="455" y1="466" x2="455" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="472" y1="466" x2="472" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="489" y1="466" x2="489" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="506" y1="466" x2="506" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="523" y1="466" x2="523" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="540" y1="466" x2="540" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="558" y1="466" x2="558" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="575" y1="466" x2="575" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="592" y1="466" x2="592" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="609" y1="466" x2="609" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="626" y1="466" x2="626" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="643" y1="466" x2="643" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="660" y1="466" x2="660" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="678" y1="466" x2="678" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="695" y1="466" x2="695" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="712" y1="466" x2="712" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="729" y1="466" x2="729" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="746" y1="466" x2="746" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="763" y1="466" x2="763" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="781" y1="466" x2="781" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="798" y1="466" x2="798" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="815" y1="466" x2="815" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="832" y1="466" x2="832" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="849" y1="466" x2="849" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="866" y1="466" x2="866" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="883" y1="466" x2="883" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="901" y1="466" x2="901" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="918" y1="466" x2="918" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="935" y1="466" x2="935" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="952" y1="466" x2="952" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="969" y1="466" x2="969" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="986" y1="466" x2="986" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="1004" y1="466" x2="1004" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="411" x2="1009" y2="411"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="302" x2="1009" y2="302"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="193" x2="1009" y2="193"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="85" x2="1009" y2="85"/>
|
||||
<text x="552" y="507" dy="-0.5ex" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
Away from actual value
|
||||
</text>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="180" y1="466" x2="180" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="266" y1="466" x2="266" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="352" y1="466" x2="352" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="438" y1="466" x2="438" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="523" y1="466" x2="523" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="609" y1="466" x2="609" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="695" y1="466" x2="695" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="781" y1="466" x2="781" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="866" y1="466" x2="866" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="952" y1="466" x2="952" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="411" x2="1009" y2="411"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="302" x2="1009" y2="302"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="193" x2="1009" y2="193"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="85" x2="1009" y2="85"/>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="94,31 94,467 "/>
|
||||
<text x="85" y="411" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"strain pp"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,411 94,411 "/>
|
||||
<text x="85" y="302" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"accuracy pp"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,302 94,302 "/>
|
||||
<text x="85" y="193" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"pp"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,193 94,193 "/>
|
||||
<text x="85" y="85" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"stars"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,85 94,85 "/>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="95,467 1009,467 "/>
|
||||
<text x="180" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.0
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="180,467 180,472 "/>
|
||||
<text x="266" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.0
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="266,467 266,472 "/>
|
||||
<text x="352" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.0
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="352,467 352,472 "/>
|
||||
<text x="438" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.0
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="438,467 438,472 "/>
|
||||
<text x="523" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.0
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="523,467 523,472 "/>
|
||||
<text x="609" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.0
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="609,467 609,472 "/>
|
||||
<text x="695" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.0
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="695,467 695,472 "/>
|
||||
<text x="781" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.0
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="781,467 781,472 "/>
|
||||
<text x="866" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.0
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="866,467 866,472 "/>
|
||||
<text x="952" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.0
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="952,467 952,472 "/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="406" x2="95" y2="416"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="411" x2="95" y2="411"/>
|
||||
<rect x="95" y="401" width="304" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="401" x2="95" y2="421"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="399" y1="411" x2="856" y2="411"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="856" y1="406" x2="856" y2="416"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="297" x2="95" y2="307"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="302" x2="95" y2="302"/>
|
||||
<rect x="95" y="292" width="76" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="292" x2="95" y2="312"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="171" y1="302" x2="285" y2="302"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="285" y1="297" x2="285" y2="307"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="188" x2="95" y2="198"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="193" x2="95" y2="193"/>
|
||||
<rect x="95" y="183" width="304" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="183" x2="95" y2="203"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="399" y1="193" x2="856" y2="193"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="856" y1="188" x2="856" y2="198"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="80" x2="95" y2="90"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="85" x2="95" y2="85"/>
|
||||
<rect x="95" y="75" width="9" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="75" x2="95" y2="95"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="104" y1="85" x2="118" y2="85"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="118" y1="80" x2="118" y2="90"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,165 @@
|
||||
<svg width="1024" height="768" viewBox="0 0 1024 768" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0" y="0" width="1023" height="767" opacity="1" fill="#FFFFFF" stroke="none"/>
|
||||
<text x="512" y="10" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="16.129032258064516" opacity="1" fill="#000000">
|
||||
osu (4908 data points)
|
||||
</text>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="111" y1="722" x2="111" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="127" y1="722" x2="127" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="143" y1="722" x2="143" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="159" y1="722" x2="159" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="175" y1="722" x2="175" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="191" y1="722" x2="191" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="207" y1="722" x2="207" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="223" y1="722" x2="223" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="239" y1="722" x2="239" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="255" y1="722" x2="255" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="271" y1="722" x2="271" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="287" y1="722" x2="287" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="303" y1="722" x2="303" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="319" y1="722" x2="319" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="335" y1="722" x2="335" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="351" y1="722" x2="351" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="367" y1="722" x2="367" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="383" y1="722" x2="383" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="399" y1="722" x2="399" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="415" y1="722" x2="415" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="431" y1="722" x2="431" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="447" y1="722" x2="447" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="463" y1="722" x2="463" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="479" y1="722" x2="479" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="495" y1="722" x2="495" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="511" y1="722" x2="511" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="527" y1="722" x2="527" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="543" y1="722" x2="543" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="559" y1="722" x2="559" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="575" y1="722" x2="575" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="591" y1="722" x2="591" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="607" y1="722" x2="607" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="623" y1="722" x2="623" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="639" y1="722" x2="639" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="655" y1="722" x2="655" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="671" y1="722" x2="671" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="687" y1="722" x2="687" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="703" y1="722" x2="703" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="719" y1="722" x2="719" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="735" y1="722" x2="735" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="751" y1="722" x2="751" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="767" y1="722" x2="767" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="783" y1="722" x2="783" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="799" y1="722" x2="799" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="815" y1="722" x2="815" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="831" y1="722" x2="831" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="847" y1="722" x2="847" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="863" y1="722" x2="863" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="879" y1="722" x2="879" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="895" y1="722" x2="895" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="911" y1="722" x2="911" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="927" y1="722" x2="927" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="943" y1="722" x2="943" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="959" y1="722" x2="959" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="975" y1="722" x2="975" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="991" y1="722" x2="991" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="1007" y1="722" x2="1007" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="664" x2="1009" y2="664"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="549" x2="1009" y2="549"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="433" x2="1009" y2="433"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="318" x2="1009" y2="318"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="202" x2="1009" y2="202"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="88" x2="1009" y2="88"/>
|
||||
<text x="552" y="763" dy="-0.5ex" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
Away from actual value
|
||||
</text>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="255" y1="722" x2="255" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="415" y1="722" x2="415" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="575" y1="722" x2="575" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="735" y1="722" x2="735" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="895" y1="722" x2="895" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="664" x2="1009" y2="664"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="549" x2="1009" y2="549"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="433" x2="1009" y2="433"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="318" x2="1009" y2="318"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="202" x2="1009" y2="202"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="88" x2="1009" y2="88"/>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="94,31 94,723 "/>
|
||||
<text x="85" y="664" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"speed pp"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,664 94,664 "/>
|
||||
<text x="85" y="549" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"flashlight pp"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,549 94,549 "/>
|
||||
<text x="85" y="433" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"aim pp"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,433 94,433 "/>
|
||||
<text x="85" y="318" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"accuracy pp"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,318 94,318 "/>
|
||||
<text x="85" y="202" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"pp"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,202 94,202 "/>
|
||||
<text x="85" y="88" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"stars"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,88 94,88 "/>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="95,723 1009,723 "/>
|
||||
<text x="255" y="733" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.005
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="255,723 255,728 "/>
|
||||
<text x="415" y="733" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.01
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="415,723 415,728 "/>
|
||||
<text x="575" y="733" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.015
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="575,723 575,728 "/>
|
||||
<text x="735" y="733" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.02
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="735,723 735,728 "/>
|
||||
<text x="895" y="733" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.025
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="895,723 895,728 "/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="659" x2="95" y2="669"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="664" x2="95" y2="664"/>
|
||||
<rect x="95" y="654" width="0" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="654" x2="95" y2="674"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="664" x2="95" y2="664"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="659" x2="95" y2="669"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="544" x2="95" y2="554"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="549" x2="101" y2="549"/>
|
||||
<rect x="101" y="539" width="302" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="165" y1="539" x2="165" y2="559"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="403" y1="549" x2="856" y2="549"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="856" y1="544" x2="856" y2="554"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="428" x2="95" y2="438"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="433" x2="95" y2="433"/>
|
||||
<rect x="95" y="423" width="0" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="423" x2="95" y2="443"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="433" x2="95" y2="433"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="428" x2="95" y2="438"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="313" x2="95" y2="323"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="318" x2="95" y2="318"/>
|
||||
<rect x="95" y="308" width="0" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="308" x2="95" y2="328"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="318" x2="95" y2="318"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="313" x2="95" y2="323"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="197" x2="95" y2="207"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="202" x2="95" y2="202"/>
|
||||
<rect x="95" y="192" width="0" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="192" x2="95" y2="212"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="202" x2="95" y2="202"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="197" x2="95" y2="207"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="83" x2="95" y2="93"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="88" x2="95" y2="88"/>
|
||||
<rect x="95" y="78" width="0" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="78" x2="95" y2="98"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="88" x2="95" y2="88"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="83" x2="95" y2="93"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,414 @@
|
||||
use std::{env, error::Error as StdError, fmt, fs::File as StdFile};
|
||||
|
||||
use futures::{stream::FuturesUnordered, TryStreamExt};
|
||||
use plotters::{
|
||||
data::fitting_range,
|
||||
prelude::{
|
||||
Boxplot, ChartBuilder, DrawingAreaErrorKind, IntoDrawingArea, IntoSegmentedCoord,
|
||||
Quartiles, SVGBackend, SegmentValue,
|
||||
},
|
||||
style::WHITE,
|
||||
};
|
||||
use rosu_pp::{Beatmap, BeatmapExt, PerformanceAttributes};
|
||||
use serde::Deserialize;
|
||||
use tokio::{fs::File, runtime::Runtime};
|
||||
|
||||
fn main() {
|
||||
dotenv::dotenv().expect("failed to read .env file");
|
||||
|
||||
Runtime::new()
|
||||
.expect("failed to create runtime")
|
||||
.block_on(async_main());
|
||||
}
|
||||
|
||||
async fn async_main() {
|
||||
let map_path_ = env::var("MAP_PATH").expect("missing `MAP_PATH` environment variable");
|
||||
let map_path = map_path_.as_str();
|
||||
|
||||
println!("Deserializing data from output.json...");
|
||||
|
||||
let file = StdFile::open("../pp-gen/output.json").expect("failed to open `output.json` file");
|
||||
let data: Vec<Data> = serde_json::from_reader(file).expect("failed to deserialize data");
|
||||
|
||||
println!(
|
||||
"Calculating values for {} map-mod combinations...",
|
||||
data.len()
|
||||
);
|
||||
|
||||
// Calculate rosu-pp's PerformanceAttributes on all map-mod pairs
|
||||
let result = data
|
||||
.into_iter()
|
||||
.map(|data| async move {
|
||||
let path = format!("{}/{}.osu", map_path, data.map_id);
|
||||
let file = File::open(path).await?;
|
||||
let map = Beatmap::parse(file).await?;
|
||||
let mods = parse_mods(&data.inner.mods);
|
||||
let attrs = map.max_pp(mods);
|
||||
|
||||
Ok::<_, Error>((data, attrs, mods))
|
||||
})
|
||||
.collect::<FuturesUnordered<_>>()
|
||||
.try_collect::<Vec<_>>()
|
||||
.await;
|
||||
|
||||
let tuples = match result {
|
||||
Ok(attrs) => attrs,
|
||||
Err(err) => return print_err(err),
|
||||
};
|
||||
|
||||
println!("Evaluating values...");
|
||||
|
||||
// Compare the values from output.json with the PerformanceAttribute values
|
||||
let mut evaluators = [
|
||||
Evaluator::new("osu"),
|
||||
Evaluator::new("taiko"),
|
||||
Evaluator::new("fruits"),
|
||||
Evaluator::new("mania"),
|
||||
];
|
||||
|
||||
for (data, attributes, mods) in tuples {
|
||||
evaluators[data.mode as usize].process(data, attributes, mods);
|
||||
}
|
||||
|
||||
for evaluator in evaluators {
|
||||
let mode = evaluator.mode;
|
||||
|
||||
if let Err(err) = evaluator.plot() {
|
||||
eprintln!("failed to plot for {}", mode);
|
||||
print_err(err);
|
||||
}
|
||||
}
|
||||
|
||||
println!("Done");
|
||||
}
|
||||
|
||||
/// Mode specific evaluator containing differences
|
||||
/// of values from `Data` and `PerformanceAttributes`.
|
||||
#[derive(Default)]
|
||||
struct Evaluator {
|
||||
mode: &'static str,
|
||||
count: usize,
|
||||
|
||||
aim: Option<Vec<f64>>,
|
||||
accuracy: Option<Vec<f64>>,
|
||||
flashlight: Option<Vec<f64>>,
|
||||
speed: Option<Vec<f64>>,
|
||||
strain: Option<Vec<f64>>,
|
||||
|
||||
stars: Vec<f64>,
|
||||
pp: Vec<f64>,
|
||||
}
|
||||
|
||||
impl Evaluator {
|
||||
fn new(mode: &'static str) -> Self {
|
||||
Self {
|
||||
mode,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
/// For all mode-specific data points, calculate the
|
||||
/// differences of `data`'s value and `attrs`' value
|
||||
fn process(&mut self, data: Data, attrs: PerformanceAttributes, mods: u32) {
|
||||
self.count += 1;
|
||||
self.stars.push(difference(data.inner.stars, attrs.stars()));
|
||||
self.pp.push(difference(data.inner.pp, attrs.pp()));
|
||||
|
||||
match attrs {
|
||||
PerformanceAttributes::Fruits(_) => {}
|
||||
PerformanceAttributes::Mania(attrs) => {
|
||||
if let Some(acc) = data.inner.accuracy {
|
||||
let values = self.accuracy.get_or_insert_with(Vec::new);
|
||||
let entry = difference(acc, attrs.pp_acc);
|
||||
values.push(entry);
|
||||
}
|
||||
|
||||
if let Some(strain) = data.inner.strain {
|
||||
let values = self.strain.get_or_insert_with(Vec::new);
|
||||
let entry = difference(strain, attrs.pp_strain);
|
||||
values.push(entry);
|
||||
}
|
||||
}
|
||||
PerformanceAttributes::Osu(attrs) => {
|
||||
if let Some(acc) = data.inner.accuracy {
|
||||
let values = self.accuracy.get_or_insert_with(Vec::new);
|
||||
let entry = difference(acc, attrs.pp_acc);
|
||||
values.push(entry);
|
||||
}
|
||||
|
||||
if let Some(aim) = data.inner.aim {
|
||||
let values = self.aim.get_or_insert_with(Vec::new);
|
||||
let entry = difference(aim, attrs.pp_aim);
|
||||
values.push(entry);
|
||||
}
|
||||
|
||||
if mods & 1024 > 0 {
|
||||
if let Some(flashlight) = data.inner.flashlight {
|
||||
let values = self.flashlight.get_or_insert_with(Vec::new);
|
||||
let entry = difference(flashlight, attrs.pp_flashlight);
|
||||
values.push(entry);
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(speed) = data.inner.speed {
|
||||
let values = self.speed.get_or_insert_with(Vec::new);
|
||||
let entry = difference(speed, attrs.pp_speed);
|
||||
values.push(entry);
|
||||
}
|
||||
}
|
||||
PerformanceAttributes::Taiko(attrs) => {
|
||||
if let Some(acc) = data.inner.accuracy {
|
||||
let values = self.accuracy.get_or_insert_with(Vec::new);
|
||||
let entry = difference(acc, attrs.pp_acc);
|
||||
values.push(entry);
|
||||
}
|
||||
|
||||
if let Some(strain) = data.inner.strain {
|
||||
let values = self.strain.get_or_insert_with(Vec::new);
|
||||
let entry = difference(strain, attrs.pp_strain);
|
||||
values.push(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Plot all gathered differences
|
||||
fn plot(self) -> Result<(), Error> {
|
||||
let mode = self.mode;
|
||||
let output_path = format!("{}_accuracy.svg", mode);
|
||||
let dataset = self.to_quartiles();
|
||||
let kind_list: Vec<_> = dataset.iter().map(|(kind, _)| *kind).collect();
|
||||
|
||||
let height = kind_list.len() as u32 * 128;
|
||||
let root = SVGBackend::new(&output_path, (1024, height)).into_drawing_area();
|
||||
root.fill(&WHITE)?;
|
||||
let root = root.margin(5, 5, 15, 15);
|
||||
|
||||
let values = dataset
|
||||
.iter()
|
||||
.map(|(_, quartiles)| quartiles.values())
|
||||
.flatten()
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let values_range = fitting_range(values.iter());
|
||||
let caption = format!("{} ({} data points)", mode, self.count);
|
||||
|
||||
// Set the chart structure
|
||||
let mut chart = ChartBuilder::on(&root)
|
||||
.x_label_area_size(40)
|
||||
.y_label_area_size(80)
|
||||
.caption(caption, ("sans-serif", 20))
|
||||
.build_cartesian_2d(
|
||||
0.0..values_range.end + values_range.end * 0.2,
|
||||
kind_list[..].into_segmented(),
|
||||
)?;
|
||||
|
||||
chart
|
||||
.configure_mesh()
|
||||
.x_desc("Away from actual value")
|
||||
.y_labels(kind_list.len())
|
||||
.light_line_style(&WHITE)
|
||||
.draw()?;
|
||||
|
||||
// Insert data into the chart
|
||||
for (kind, quartile) in dataset.iter() {
|
||||
chart.draw_series(std::iter::once(
|
||||
Boxplot::new_horizontal(SegmentValue::CenterOf(kind), quartile)
|
||||
.width(20)
|
||||
.whisker_width(0.5),
|
||||
))?;
|
||||
}
|
||||
|
||||
root.present()?;
|
||||
println!("Finished plotting {}", mode);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn to_quartiles(&self) -> Vec<(&'static str, Quartiles)> {
|
||||
let mut vec = Vec::new();
|
||||
|
||||
println!("---");
|
||||
|
||||
let max = self
|
||||
.stars
|
||||
.iter()
|
||||
.fold(0.0, |m, &n| if n > m { n } else { m });
|
||||
let avg = self.stars.iter().copied().sum::<f64>() / self.stars.len() as f64;
|
||||
println!("[{}] Stars: average={} | max={}", self.mode, avg, max);
|
||||
vec.push(("stars", Quartiles::new(&self.stars)));
|
||||
|
||||
let max = self.pp.iter().fold(0.0, |m, &n| if n > m { n } else { m });
|
||||
let avg = self.pp.iter().copied().sum::<f64>() / self.pp.len() as f64;
|
||||
println!("[{}] PP: average={} | max={}", self.mode, avg, max);
|
||||
vec.push(("pp", Quartiles::new(&self.pp)));
|
||||
|
||||
if let Some(ref acc) = self.accuracy {
|
||||
if !acc.is_empty() {
|
||||
let max = acc.iter().fold(0.0, |m, &n| if n > m { n } else { m });
|
||||
let avg = acc.iter().copied().sum::<f64>() / acc.len() as f64;
|
||||
println!("[{}] Accuracy: average={} | max={}", self.mode, avg, max);
|
||||
}
|
||||
|
||||
vec.push(("accuracy pp", Quartiles::new(acc)));
|
||||
}
|
||||
|
||||
if let Some(ref aim) = self.aim {
|
||||
if !aim.is_empty() {
|
||||
let max = aim.iter().fold(0.0, |m, &n| if n > m { n } else { m });
|
||||
let avg = aim.iter().copied().sum::<f64>() / aim.len() as f64;
|
||||
println!("[{}] Aim: average={} | max={}", self.mode, avg, max);
|
||||
}
|
||||
|
||||
vec.push(("aim pp", Quartiles::new(aim)));
|
||||
}
|
||||
|
||||
if let Some(ref fl) = self.flashlight {
|
||||
if !fl.is_empty() {
|
||||
let max = fl.iter().fold(0.0, |m, &n| if n > m { n } else { m });
|
||||
let avg = fl.iter().copied().sum::<f64>() / fl.len() as f64;
|
||||
println!("[{}] Flashlight: average={} | max={}", self.mode, avg, max);
|
||||
}
|
||||
|
||||
vec.push(("flashlight pp", Quartiles::new(fl)));
|
||||
}
|
||||
|
||||
if let Some(ref speed) = self.speed {
|
||||
if !speed.is_empty() {
|
||||
let max = speed.iter().fold(0.0, |m, &n| if n > m { n } else { m });
|
||||
let avg = speed.iter().copied().sum::<f64>() / speed.len() as f64;
|
||||
println!("[{}] Speed: average={} | max={}", self.mode, avg, max);
|
||||
}
|
||||
|
||||
vec.push(("speed pp", Quartiles::new(speed)));
|
||||
}
|
||||
|
||||
if let Some(ref strain) = self.strain {
|
||||
if !strain.is_empty() {
|
||||
let max = strain.iter().fold(0.0, |m, &n| if n > m { n } else { m });
|
||||
let avg = strain.iter().copied().sum::<f64>() / strain.len() as f64;
|
||||
println!("[{}] Strain: average={} | max={}", self.mode, avg, max);
|
||||
}
|
||||
|
||||
vec.push(("strain pp", Quartiles::new(strain)));
|
||||
}
|
||||
|
||||
vec.reverse();
|
||||
|
||||
println!("---");
|
||||
|
||||
vec
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
enum Error {
|
||||
DrawingArea(String),
|
||||
Io(std::io::Error),
|
||||
ParseMap(rosu_pp::ParseError),
|
||||
}
|
||||
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
Self::DrawingArea(src) => write!(f, "drawing area error: {}", src),
|
||||
Self::Io(_) => f.write_str("io error"),
|
||||
Self::ParseMap(_) => f.write_str("failed to parse map"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl StdError for Error {
|
||||
fn source(&self) -> Option<&(dyn StdError + 'static)> {
|
||||
match self {
|
||||
Self::DrawingArea(_) => None,
|
||||
Self::Io(src) => Some(src),
|
||||
Self::ParseMap(src) => Some(src),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: StdError + Send + Sync> From<DrawingAreaErrorKind<E>> for Error {
|
||||
fn from(e: DrawingAreaErrorKind<E>) -> Self {
|
||||
Self::DrawingArea(e.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<std::io::Error> for Error {
|
||||
fn from(e: std::io::Error) -> Self {
|
||||
Self::Io(e)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<rosu_pp::ParseError> for Error {
|
||||
fn from(e: rosu_pp::ParseError) -> Self {
|
||||
Self::ParseMap(e)
|
||||
}
|
||||
}
|
||||
|
||||
fn difference(actual: f64, calculated: f64) -> f64 {
|
||||
(actual - calculated).abs()
|
||||
}
|
||||
|
||||
fn parse_mods(mods_str: &str) -> u32 {
|
||||
let mut mods = 0;
|
||||
|
||||
for m in mods_str.split(", ") {
|
||||
match m {
|
||||
"None" => {}
|
||||
"NF" => mods += 1,
|
||||
"EZ" => mods += 2,
|
||||
"TD" => mods += 4,
|
||||
"HD" => mods += 8,
|
||||
"HR" => mods += 16,
|
||||
"DT" => mods += 64,
|
||||
"RX" => mods += 128,
|
||||
"HT" => mods += 256,
|
||||
"FL" => mods += 1024,
|
||||
_ => panic!("unrecognized mod: {}", m),
|
||||
}
|
||||
}
|
||||
|
||||
mods
|
||||
}
|
||||
|
||||
fn print_err(err: Error) {
|
||||
let mut e: &dyn StdError = &err;
|
||||
eprintln!("{}", err);
|
||||
|
||||
while let Some(src) = e.source() {
|
||||
eprintln!(" - caused by: {}", src);
|
||||
e = src;
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct Data {
|
||||
mode: u32,
|
||||
map_id: u32,
|
||||
#[serde(flatten)]
|
||||
inner: GenericData,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct GenericData {
|
||||
#[serde(default, alias = "Aim")]
|
||||
aim: Option<f64>,
|
||||
#[serde(default, alias = "Speed")]
|
||||
speed: Option<f64>,
|
||||
#[serde(default, alias = "Accuracy")]
|
||||
accuracy: Option<f64>,
|
||||
#[serde(default, alias = "Flashlight")]
|
||||
flashlight: Option<f64>,
|
||||
#[serde(default, alias = "Strain")]
|
||||
strain: Option<f64>,
|
||||
#[serde(default, alias = "OD")]
|
||||
od: Option<f64>,
|
||||
#[serde(default, alias = "AR")]
|
||||
ar: Option<f64>,
|
||||
#[serde(alias = "Mods")]
|
||||
mods: String,
|
||||
#[serde(alias = "Stars")]
|
||||
stars: f64,
|
||||
pp: f64,
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
<svg width="1024" height="512" viewBox="0 0 1024 512" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0" y="0" width="1023" height="511" opacity="1" fill="#FFFFFF" stroke="none"/>
|
||||
<text x="512" y="10" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="16.129032258064516" opacity="1" fill="#000000">
|
||||
taiko (343 data points)
|
||||
</text>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="108" y1="466" x2="108" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="122" y1="466" x2="122" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="136" y1="466" x2="136" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="150" y1="466" x2="150" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="164" y1="466" x2="164" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="178" y1="466" x2="178" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="192" y1="466" x2="192" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="206" y1="466" x2="206" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="220" y1="466" x2="220" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="234" y1="466" x2="234" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="248" y1="466" x2="248" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="262" y1="466" x2="262" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="276" y1="466" x2="276" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="290" y1="466" x2="290" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="304" y1="466" x2="304" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="318" y1="466" x2="318" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="332" y1="466" x2="332" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="346" y1="466" x2="346" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="360" y1="466" x2="360" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="374" y1="466" x2="374" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="388" y1="466" x2="388" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="402" y1="466" x2="402" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="416" y1="466" x2="416" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="430" y1="466" x2="430" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="444" y1="466" x2="444" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="458" y1="466" x2="458" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="472" y1="466" x2="472" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="486" y1="466" x2="486" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="499" y1="466" x2="499" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="513" y1="466" x2="513" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="527" y1="466" x2="527" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="541" y1="466" x2="541" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="555" y1="466" x2="555" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="569" y1="466" x2="569" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="583" y1="466" x2="583" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="597" y1="466" x2="597" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="611" y1="466" x2="611" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="625" y1="466" x2="625" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="639" y1="466" x2="639" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="653" y1="466" x2="653" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="667" y1="466" x2="667" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="681" y1="466" x2="681" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="695" y1="466" x2="695" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="709" y1="466" x2="709" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="723" y1="466" x2="723" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="737" y1="466" x2="737" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="751" y1="466" x2="751" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="765" y1="466" x2="765" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="779" y1="466" x2="779" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="793" y1="466" x2="793" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="807" y1="466" x2="807" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="821" y1="466" x2="821" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="835" y1="466" x2="835" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="849" y1="466" x2="849" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="863" y1="466" x2="863" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="877" y1="466" x2="877" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="891" y1="466" x2="891" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="904" y1="466" x2="904" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="918" y1="466" x2="918" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="932" y1="466" x2="932" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="946" y1="466" x2="946" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="960" y1="466" x2="960" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="974" y1="466" x2="974" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="988" y1="466" x2="988" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="1002" y1="466" x2="1002" y2="30"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="411" x2="1009" y2="411"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="302" x2="1009" y2="302"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="193" x2="1009" y2="193"/>
|
||||
<line opacity="1" stroke="#FFFFFF" stroke-width="1" x1="95" y1="85" x2="1009" y2="85"/>
|
||||
<text x="552" y="507" dy="-0.5ex" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
Away from actual value
|
||||
</text>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="234" y1="466" x2="234" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="374" y1="466" x2="374" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="513" y1="466" x2="513" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="653" y1="466" x2="653" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="793" y1="466" x2="793" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="932" y1="466" x2="932" y2="30"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="411" x2="1009" y2="411"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="302" x2="1009" y2="302"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="193" x2="1009" y2="193"/>
|
||||
<line opacity="0.2" stroke="#000000" stroke-width="1" x1="95" y1="85" x2="1009" y2="85"/>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="94,31 94,467 "/>
|
||||
<text x="85" y="411" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"strain pp"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,411 94,411 "/>
|
||||
<text x="85" y="302" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"accuracy pp"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,302 94,302 "/>
|
||||
<text x="85" y="193" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"pp"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,193 94,193 "/>
|
||||
<text x="85" y="85" dy="0.5ex" text-anchor="end" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
"stars"
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="89,85 94,85 "/>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="95,467 1009,467 "/>
|
||||
<text x="234" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
0.5
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="234,467 234,472 "/>
|
||||
<text x="374" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
1.0
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="374,467 374,472 "/>
|
||||
<text x="513" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
1.5
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="513,467 513,472 "/>
|
||||
<text x="653" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
2.0
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="653,467 653,472 "/>
|
||||
<text x="793" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
2.5
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="793,467 793,472 "/>
|
||||
<text x="932" y="477" dy="0.76em" text-anchor="middle" font-family="sans-serif" font-size="9.67741935483871" opacity="1" fill="#000000">
|
||||
3.0
|
||||
</text>
|
||||
<polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="932,467 932,472 "/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="406" x2="95" y2="416"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="411" x2="95" y2="411"/>
|
||||
<rect x="95" y="401" width="8" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="96" y1="401" x2="96" y2="421"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="103" y1="411" x2="116" y2="411"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="116" y1="406" x2="116" y2="416"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="297" x2="95" y2="307"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="302" x2="95" y2="302"/>
|
||||
<rect x="95" y="292" width="285" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="292" x2="95" y2="312"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="380" y1="302" x2="809" y2="302"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="809" y1="297" x2="809" y2="307"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="188" x2="95" y2="198"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="193" x2="95" y2="193"/>
|
||||
<rect x="95" y="183" width="305" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="103" y1="183" x2="103" y2="203"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="400" y1="193" x2="856" y2="193"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="856" y1="188" x2="856" y2="198"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="80" x2="95" y2="90"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="85" x2="95" y2="85"/>
|
||||
<rect x="95" y="75" width="0" height="20" opacity="1" fill="none" stroke="#000000"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="75" x2="95" y2="95"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="85" x2="95" y2="85"/>
|
||||
<line opacity="1" stroke="#000000" stroke-width="1" x1="95" y1="80" x2="95" y2="90"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user