You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plotlars is a versatile Rust library that acts as a wrapper around the Plotly crate, bridging the gap between the powerful Polars data analysis library and Plotly. It simplifies the process of creating visualizations from data frames, allowing developers to focus on data insights rather than the intricacies of plot creation.
14
+
Plotlars is a versatile Rust library that acts as a wrapper around the Plotly
15
+
crate, bridging the gap between the powerful Polars data analysis library and
16
+
Plotly. It simplifies the process of creating visualizations from data frames,
17
+
allowing developers to focus on data insights rather than the intricacies of
18
+
plot creation.
11
19
12
20
## Motivation
13
21
14
-
The creation of Plotlars was driven by the need to simplify the process of creating complex plots in Rust, particularly when working with the powerful Polars data manipulation library. Generating visualizations often requires extensive boilerplate code and deep knowledge of both the plotting library (Plotly) and the data structure. This complexity can be a significant hurdle, especially for users who need to focus on analyzing and interpreting data rather than wrestling with intricate plotting logic.
15
-
16
-
To illustrate this, consider the following example where a scatter plot is created without Plotlars:
22
+
The creation of Plotlars was driven by the need to simplify the process of
23
+
creating complex plots in Rust, particularly when working with the powerful
24
+
Polars data manipulation library. Generating visualizations often requires
25
+
extensive boilerplate code and deep knowledge of both the plotting library
26
+
(Plotly) and the data structure. This complexity can be a significant hurdle,
27
+
especially for users who need to focus on analyzing and interpreting data rather
28
+
than wrestling with intricate plotting logic.
17
29
18
-
**Without Plotlars**
30
+
To illustrate this, consider the following example where a scatter plot is
31
+
created **without Plotlars**:
19
32
20
33
```rust
21
34
useplotly::{
@@ -92,11 +105,11 @@ fn main() {
92
105
}
93
106
```
94
107
95
-
In this example, creating a scatter plot involves writing substantial code to manually handle the data and configure the plot, including grouping the data by category and setting up the plot layout.
96
-
97
-
**With Plotlars**
108
+
In this example, creating a scatter plot involves writing substantial code to
109
+
manually handle the data and configure the plot, including grouping the data by
110
+
category and setting up the plot layout.
98
111
99
-
Now, compare that to the same plot created using Plotlars:
112
+
Now, compare that to the same plot created **using Plotlars**:
100
113
101
114
```rust
102
115
useplotlars::{
@@ -142,7 +155,11 @@ This is the output:
142
155
143
156

144
157
145
-
With Plotlars, the same scatter plot is created with significantly less code. The library abstracts away the complexities of dealing with individual plot components and allows the user to specify high-level plot characteristics. This streamlined approach not only saves time but also reduces the potential for errors and makes the code more readable and maintainable.
158
+
With Plotlars, the same scatter plot is created with significantly less code.
159
+
The library abstracts away the complexities of dealing with individual plot
160
+
components and allows the user to specify high-level plot characteristics. This
161
+
streamlined approach not only saves time but also reduces the potential for
162
+
errors and makes the code more readable and maintainable.
146
163
147
164
## Installation
148
165
@@ -152,8 +169,10 @@ cargo add plotlars
152
169
153
170
## Features
154
171
155
-
- Seamless Integration with Polars: Leverage the power of Polars for efficient data manipulation and analysis.
156
-
- Support for Multiple Plot Types: Easily create bar, line, scatter, and other plot types.
172
+
- Seamless Integration with Polars: Leverage the power of Polars for efficient
173
+
data manipulation and analysis.
174
+
- Support for Multiple Plot Types: Easily create bar, line, scatter, and other
175
+
plot types.
157
176
- Customization: Modify plot appearance with an intuitive API.
158
177
159
178
## License
@@ -162,6 +181,9 @@ This project is licensed under the MIT License. See the LICENSE.txt file for det
162
181
163
182
## Acknowledgements
164
183
165
-
-[Polars](https://github.com/pola-rs/polars): For providing a fast and efficient data manipulation library.
166
-
-[Plotly](https://github.com/plotly/plotly.rs): For the inspiration and ideas behind visualization libraries.
167
-
- Rust Community: For the support and development of an amazing programming language.
184
+
-[Polars](https://github.com/pola-rs/polars): For providing a fast and
185
+
efficient data manipulation library.
186
+
-[Plotly](https://github.com/plotly/plotly.rs): For the inspiration and ideas
187
+
behind visualization libraries.
188
+
- Rust Community: For the support and development of an amazing programming
//! Plotlars is a versatile Rust library that bridges the gap between the powerful Polars data analysis library and Plotly library. It simplifies the process of creating visualizations from data frames, allowing developers to focus on data insights rather than the intricacies of plot creation.
12
-
//!
13
-
//! ## Motivation
14
-
//!
15
-
//! The creation of Plotlars was driven by the need to simplify the process of creating complex plots in Rust, particularly when working with the powerful Polars data manipulation library. Generating visualizations often requires extensive boilerplate code and deep knowledge of both the plotting library and the data structure. This complexity can be a significant hurdle, especially for users who need to focus on analyzing and interpreting data rather than wrestling with intricate plotting logic.
16
-
//!
17
-
//! To illustrate this, consider the following example where a scatter plot is created without Plotlars:
18
-
//!
19
-
//! **Without Plotlars**
20
-
//!
21
-
//! ```rust
22
-
//! use plotly::{
23
-
//! common::*,
24
-
//! layout::*,
25
-
//! Plot,
26
-
//! Scatter,
27
-
//! };
28
-
//!
29
-
//! use polars::prelude::*;
30
-
//!
31
-
//! fn main() {
32
-
//! let dataset = LazyCsvReader::new("data/penguins.csv")
//! In this example, creating a scatter plot involves writing substantial code to manually handle the data and configure the plot, including grouping the data by category and setting up the plot layout.
97
-
//!
98
-
//! **With Plotlars**
99
-
//!
100
-
//! Now, compare that to the same plot created using Plotlars:
101
-
//!
102
-
//! ```rust
103
-
//! use plotlars::{
104
-
//! ScatterPlot,
105
-
//! Plot,
106
-
//! Text,
107
-
//! };
108
-
//!
109
-
//! use polars::prelude::*;
110
-
//!
111
-
//! fn main() {
112
-
//! let dataset = LazyCsvReader::new("data/penguins.csv")
//! With Plotlars, the same scatter plot is created with significantly less code. The library abstracts away the complexities of dealing with individual plot components and allows the user to specify high-level plot characteristics. This streamlined approach not only saves time but also reduces the potential for errors and makes the code more readable and maintainable.
147
-
//!
148
-
//! ## Installation
149
-
//!
150
-
//! ```bash
151
-
//! cargo add plotlars
152
-
//! ```
153
-
//!
154
-
//! ## Features
155
-
//!
156
-
//! - Seamless Integration with Polars: Leverage the power of Polars for efficient data manipulation and analysis.
157
-
//! - Support for Multiple Plot Types: Easily create bar, line, scatter, and other plot types.
158
-
//! - Customization: Modify plot appearance with an intuitive API.
159
-
//!
160
-
//! ## License
161
-
//!
162
-
//! This project is licensed under the MIT License. See the LICENSE.txt file for details.
163
-
//!
164
-
//! ## Acknowledgements
165
-
//!
166
-
//! - [Polars](https://github.com/pola-rs/polars): For providing a fast and efficient data manipulation library.
167
-
//! - [Plotly](https://github.com/plotly/plotly.rs): For the inspiration and ideas behind visualization libraries.
168
-
//! - Rust Community: For the support and development of an amazing programming language.
0 commit comments