Closed ulises-jeremias closed 11 months ago
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.
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!" 🎉
Summary by CodeRabbit
plot_scatter
,plot_scatter3d_1
, andplot_scatter_colorscale
examples by removing unnecessary mapping operations, improving code readability.PlotConfig
andPlotlyScriptConfig
inplot/show.v
to provide more configuration options for Plotly plots, enhancing customization.get_plotly_script
function inplot/show.v
to generate plot scripts as HTML tags, enabling easier integration with web pages.Layout
struct inplot/layout.v
to improve plot layout configuration, enhancing the visual appeal of plots.Annotation
struct inplot/annotation.v
to require certain fields, ensuring more consistent annotations.XType
,YType
, andZType
inplot/trace.v
to accept arrays of integers, broadening data type compatibility.