Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the plotting functionality to make font sizes configurable throughout the visualization, changing from a hardcoded default of 14 to 9, and improving label consistency.
- Default font size reduced from 14 to 9 and propagated throughout all plotting functions
- Updated terminology from "Wetting phase saturation" to "Water saturation" and "Intrinsic curve" to "Fine-scale curve"
- Added
t_pcreturn variable tonested_tilesfunction and configured plot handle line styles for better visualization
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| % ylabel(ax_pc,'[-]'); | ||
| ax_pc.YScale='log'; | ||
| curves_plot([ax_krw_x,ax_krw_y,ax_krw_z;ax_krg_x,ax_krg_y,ax_krg_z], ... | ||
| strata_trapped, strata_trapped.params, args.kr_scale); |
There was a problem hiding this comment.
The curves_plot function signature now requires a font_size parameter (line 47), but this call doesn't pass args.font_size. This will cause the function call to fail.
Add args.font_size as the fourth parameter:
curves_plot([ax_krw_x,ax_krw_y,ax_krw_z;ax_krg_x,ax_krg_y,ax_krg_z], ...
strata_trapped, strata_trapped.params, args.font_size, args.kr_scale);| strata_trapped, strata_trapped.params, args.kr_scale); | |
| strata_trapped, strata_trapped.params, args.font_size, args.kr_scale); |
|
|
||
| plot_handle(1).LineStyle = '-.'; | ||
| plot_handle(2).LineStyle =':'; | ||
| plot_handle(2).LineStyle =':'; |
There was a problem hiding this comment.
Line 96 is a duplicate of line 95, both setting plot_handle(2).LineStyle = ':'. This appears to be unintentional. If you meant to set plot_handle(3).LineStyle, please correct it; otherwise, remove the duplicate line.
| plot_handle(2).LineStyle =':'; |
| end | ||
|
|
||
| legend(ax,legends,'Location','northoutside'); | ||
| legends = {'Median','Quantiles 0.01 and 0.99','',legend_base{:}}; |
There was a problem hiding this comment.
The legend array contains an empty string '' at position 3, which will create an unwanted empty legend entry. If this is meant to represent the third plot handle, it should have a meaningful label or be removed if unnecessary. Consider restructuring the legend logic to avoid empty entries:
legends = [{'Median','Quantiles 0.01 and 0.99'}, legend_base];| legends = {'Median','Quantiles 0.01 and 0.99','',legend_base{:}}; | |
| legends = {'Median','Quantiles 0.01 and 0.99',legend_base{:}}; |
| x_data (1,:) double | ||
| base_func | ||
| data (:,:) double | ||
| font_size |
There was a problem hiding this comment.
The font_size parameter is missing type validation in the arguments block. For consistency with other parameters like x_data (1,:) double and show_legend (1,1) logical, consider adding type validation:
font_size (1,1) double| font_size | |
| font_size (1,1) double |
| ax_kr | ||
| strata_trapped | ||
| params | ||
| font_size |
There was a problem hiding this comment.
The font_size parameter is missing type validation in the arguments block. For consistency with other parameters and to ensure type safety, consider adding validation:
font_size (1,1) double| font_size | |
| font_size (1,1) double |
closes #152