Skip to content

Update plot_result.m#153

Closed
djmaxus wants to merge 1 commit intomainfrom
plot-bw-friendly
Closed

Update plot_result.m#153
djmaxus wants to merge 1 commit intomainfrom
plot-bw-friendly

Conversation

@djmaxus
Copy link
Copy Markdown
Collaborator

@djmaxus djmaxus commented Nov 7, 2025

closes #152

Copilot AI review requested due to automatic review settings November 7, 2025 12:26
Copy link
Copy Markdown

Copilot AI left a 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_pc return variable to nested_tiles function and configured plot handle line styles for better visualization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/plot_result.m
% 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);
Copy link

Copilot AI Nov 7, 2025

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);
Suggested change
strata_trapped, strata_trapped.params, args.kr_scale);
strata_trapped, strata_trapped.params, args.font_size, args.kr_scale);

Copilot uses AI. Check for mistakes.
Comment thread src/plot_result.m

plot_handle(1).LineStyle = '-.';
plot_handle(2).LineStyle =':';
plot_handle(2).LineStyle =':';
Copy link

Copilot AI Nov 7, 2025

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.

Suggested change
plot_handle(2).LineStyle =':';

Copilot uses AI. Check for mistakes.
Comment thread src/plot_result.m
end

legend(ax,legends,'Location','northoutside');
legends = {'Median','Quantiles 0.01 and 0.99','',legend_base{:}};
Copy link

Copilot AI Nov 7, 2025

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];
Suggested change
legends = {'Median','Quantiles 0.01 and 0.99','',legend_base{:}};
legends = {'Median','Quantiles 0.01 and 0.99',legend_base{:}};

Copilot uses AI. Check for mistakes.
Comment thread src/plot_result.m
x_data (1,:) double
base_func
data (:,:) double
font_size
Copy link

Copilot AI Nov 7, 2025

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
Suggested change
font_size
font_size (1,1) double

Copilot uses AI. Check for mistakes.
Comment thread src/plot_result.m
ax_kr
strata_trapped
params
font_size
Copy link

Copilot AI Nov 7, 2025

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
Suggested change
font_size
font_size (1,1) double

Copilot uses AI. Check for mistakes.
@djmaxus djmaxus marked this pull request as draft December 10, 2025 22:42
@djmaxus djmaxus closed this Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upload new summary plot style

2 participants