vlang / vsl

V library to develop Artificial Intelligence and High-Performance Scientific Computations
https://vlang.github.io/vsl
MIT License
351 stars 44 forks source link

Started working updating vsl.plot #181

Closed ulises-jeremias closed 11 months ago

ulises-jeremias commented 11 months ago

Summary by CodeRabbit

coderabbitai[bot] commented 11 months ago

Walkthrough

The changes primarily focus on simplifying the code and enhancing the functionality of the plot module. The modifications include the removal of unnecessary mapping operations, the addition of new structs for plot configuration, and the enhancement of existing structs to improve plot layout and annotation.

Changes

File(s) Summary
examples/plot_heatmap_golden_ratio/main.v Wrapped code in main function, removed commented-out code, and made minor adjustments to function calls.
examples/plot_scatter/main.v, examples/plot_scatter3d_1/main.v, examples/plot_scatter_colorscale/main.v Simplified code by removing unnecessary map function calls and directly assigning results to variables.
examples/plot_scatter_with_annotations/main.v Added a new module with a main function for plotting a scatter plot with annotations.
plot/annotation.v Made changes to the Annotation struct, making some fields required and others optional.
plot/layout.v Modified the Layout struct, changing default values and field types.
plot/show.v Added new structs for plot configuration, a function for generating plot script, and modified existing functions and structs to use these new additions.
plot/trace.v Enhanced XType, YType, and ZType types to accept arrays of integers.

🐇

"In the land of code, where the shadows lie,

A rabbit hopped, with a twinkle in its eye.

With every hop, a change was made,

Simplifying code, enhancing the grade.

Now the plots are neat, and the code is clean,

Thanks to the rabbit, the coding machine!" 🎉


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - If you reply to a *review comment* from CodeRabbit, the bot will automatically respond. - To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment - Note: Review comments are made on code diffs or files, not on the PR overview. - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai help` to get help. Note: For conversation with the bot, please use the review comments on code diffs or files.