fix error
This commit is contained in:
@@ -10,7 +10,7 @@ arguments
|
||||
end
|
||||
|
||||
action_id = lower(string(action_id));
|
||||
cla(ax);
|
||||
reset_plot_axes(ax);
|
||||
|
||||
switch action_id
|
||||
case "plot_well_response"
|
||||
@@ -35,6 +35,7 @@ wellpara = results.Wellpara;
|
||||
well_index = get_option(options, 'well_index', 1);
|
||||
metric = upper(string(get_option(options, 'metric', "BHP")));
|
||||
|
||||
view(ax, 2);
|
||||
set(ax, 'XScale', 'linear', 'YScale', 'linear');
|
||||
|
||||
if isempty(wellpara)
|
||||
@@ -122,6 +123,7 @@ for i = 1:nx * ny
|
||||
end
|
||||
|
||||
fill(ax, x, y, dis, 'EdgeColor', 'interp');
|
||||
view(ax, 2);
|
||||
axis(ax, 'equal');
|
||||
axis(ax, 'tight');
|
||||
colormap(ax, jet);
|
||||
@@ -201,6 +203,7 @@ for i = 1:nx * ny
|
||||
end
|
||||
|
||||
fill(ax, x, y, dis, 'EdgeColor', 'interp');
|
||||
view(ax, 2);
|
||||
axis(ax, 'equal');
|
||||
axis(ax, 'tight');
|
||||
colormap(ax, jet);
|
||||
@@ -259,3 +262,26 @@ else
|
||||
value = fallback;
|
||||
end
|
||||
end
|
||||
|
||||
function reset_plot_axes(ax)
|
||||
cla(ax);
|
||||
hold(ax, 'off');
|
||||
grid(ax, 'off');
|
||||
view(ax, 2);
|
||||
colorbar(ax, 'off');
|
||||
|
||||
set(ax, ...
|
||||
'XScale', 'linear', ...
|
||||
'YScale', 'linear', ...
|
||||
'ZScale', 'linear', ...
|
||||
'XLimMode', 'auto', ...
|
||||
'YLimMode', 'auto', ...
|
||||
'ZLimMode', 'auto', ...
|
||||
'CLimMode', 'auto', ...
|
||||
'DataAspectRatioMode', 'auto', ...
|
||||
'PlotBoxAspectRatioMode', 'auto', ...
|
||||
'CameraPositionMode', 'auto', ...
|
||||
'CameraTargetMode', 'auto', ...
|
||||
'CameraUpVectorMode', 'auto', ...
|
||||
'CameraViewAngleMode', 'auto');
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user