-
Notifications
You must be signed in to change notification settings - Fork 1
Update plot_result.m #153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update plot_result.m #153
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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); |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 =':'; |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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{:}}; |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot
AI
Nov 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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