Skip to content

Commit

Permalink
Merge pull request #23 from alceal:the-great-refactoring
Browse files Browse the repository at this point in the history
refactor: A deep refactoring
  • Loading branch information
alceal authored Oct 26, 2024
2 parents b39ad1b + 86056c6 commit f3c93ee
Show file tree
Hide file tree
Showing 44 changed files with 2,777 additions and 2,711 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ categories = ["visualization"]
bon = "2.3.0"
plotly = "0.10.0"
polars = { version = "0.43.1", features = [
# "dtype-categorical",
"lazy",
"strings",
] }
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,13 @@ fn main() {
.x("body_mass_g")
.y("flipper_length_mm")
.group("species")
.size(10)
.opacity(0.5)
.size(12)
.colors(vec![
Rgb(178, 34, 34),
Rgb(65, 105, 225),
Rgb(255, 140, 0),
])
.plot_title("Penguin Flipper Length vs Body Mass")
.x_title("Body Mass (g)")
.y_title("Flipper Length (mm)")
Expand All @@ -153,7 +158,7 @@ fn main() {

This is the output:

![Plot example](https://imgur.com/PkQ9fsc.png)
![Plot example](https://imgur.com/QMkmhNh.png)

With Plotlars, the same scatter plot is created with significantly less code.
The library abstracts away the complexities of dealing with individual plot
Expand Down
13 changes: 13 additions & 0 deletions data/revenue_and_cost.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Date,Revenue,Cost
2023-01-31,10320.183877729267,8251.593217832866
2023-02-28,23361.49949229147,15876.260386054937
2023-03-31,33853.53981955318,17737.523093159074
2023-04-30,47114.92739147375,34797.129368772985
2023-05-31,61960.96581901887,48052.000872334065
2023-06-30,73843.24767793017,49471.418315826566
2023-07-31,85638.49495007776,48950.09739941198
2023-08-31,93548.36563617105,64578.173115080426
2023-09-30,104221.93731957133,77044.56755616776
2023-10-31,117776.12613238876,65033.11155742126
2023-11-30,128275.85434203708,69543.76388145327
2023-12-31,140358.10583941432,103142.19972170686
65 changes: 0 additions & 65 deletions data/sales.csv

This file was deleted.

73 changes: 0 additions & 73 deletions src/aesthetics/line.rs

This file was deleted.

67 changes: 0 additions & 67 deletions src/aesthetics/mark.rs

This file was deleted.

3 changes: 0 additions & 3 deletions src/aesthetics/mod.rs

This file was deleted.

22 changes: 0 additions & 22 deletions src/aesthetics/orientation.rs

This file was deleted.

15 changes: 0 additions & 15 deletions src/colors/mod.rs

This file was deleted.

Loading

0 comments on commit f3c93ee

Please sign in to comment.