Skip to content

Commit

Permalink
Added colorbar in ZG
Browse files Browse the repository at this point in the history
  • Loading branch information
lmendo committed Dec 6, 2020
1 parent 0917c05 commit f9707fb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
Binary file modified funDef.mat
Binary file not shown.
7 changes: 6 additions & 1 deletion funDef.txt
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ YG 2 inf 2 3 0 0 0 true true true true if (isnumeric(in{end}) || islogical(in{e
error('MATL:runtime', 'MATL run-time error: unrecognized last input');
end
end
ZG 1 inf 2 3 0 1 0 true true true true switch in{end} control appearance of graphics / format Depending on numeric last input, calls a graphic function or \matlab+format+ with the remaining inputs. $0$: \matlab+format+. $1$: \matlab+axis+. Calls \matlab+drawnow+ to update figure immediately. Flag strings in first to second-last inputs can be replaced by numbers, as follows: 1: \matlab+'equal'+, 2: \matlab+'image'+, 3: \matlab+'square'+, 4: \matlab+'ij'+, 5: \matlab+'xy'+, 6: \matlab+'normal'+, 7: \matlab+'off'+, 8: \matlab+'on'+, 9: \matlab+'tight'+, 10: \matlab+'manual'+, 11: \matlab+'fill'+, 12: \matlab+'auto'+, 13: \matlab+'vis3d'+. $2$: \matlab+colormap+. If the first input is numeric, has the shape of a colormap, and has some entry greater than $1$, it is normalized by converting to \matlab+uint8+, then to \matlab+double+, and then dividing by $255$. With $3$ inputs (including the last input 2), the second input specifies colormap size. With $0$ outputs, calls \matlab+drawnow+ to update figure immediately. $3$: \matlab+hold+. Flag strings in first input can be replaced by numbers, as follows: 1: \matlab+'on'+, 2: \matlab+'off'+. $4$: \matlab+grid+. Flag strings in first input can be replaced by numbers, as follows: 1: \matlab+'on'+, 2: \matlab+'off'+.
ZG 1 inf 2 3 0 1 0 true true true true switch in{end} control appearance of graphics / format Depending on numeric last input, calls a graphic function or \matlab+format+ with the remaining inputs. $0$: \matlab+format+. $1$: \matlab+axis+. Calls \matlab+drawnow+ to update figure immediately. Flag strings in first to second-last inputs can be replaced by numbers, as follows: 1: \matlab+'equal'+, 2: \matlab+'image'+, 3: \matlab+'square'+, 4: \matlab+'ij'+, 5: \matlab+'xy'+, 6: \matlab+'normal'+, 7: \matlab+'off'+, 8: \matlab+'on'+, 9: \matlab+'tight'+, 10: \matlab+'manual'+, 11: \matlab+'fill'+, 12: \matlab+'auto'+, 13: \matlab+'vis3d'+. $2$: \matlab+colormap+. If the first input is numeric, has the shape of a colormap, and has some entry greater than $1$, it is normalized by converting to \matlab+uint8+, then to \matlab+double+, and then dividing by $255$. With $3$ inputs (including the last input 2), the second input specifies colormap size. With $0$ outputs, calls \matlab+drawnow+ to update figure immediately. $3$: \matlab+hold+. Flag strings in first input can be replaced by numbers, as follows: 1: \matlab+'on'+, 2: \matlab+'off'+. $4$: \matlab+grid+. Flag strings in first input can be replaced by numbers, as follows: 1: \matlab+'on'+, 2: \matlab+'off'+. $5$: \matlab+colorbar+. If the first input is logical (not necessarily scalar) it activates or deactivates the colorbar
case 0
format(in{1:end-1});
case 1
Expand Down Expand Up @@ -859,6 +859,11 @@ ZG 1 inf 2 3 0 1 0 true true true true switch in{end} control appearance of gra
str = {'on' 'off'};
if numel(in)>1 && isnumeric(in{1}), in(1) = str(in{1}); end; clear k str
grid(in{1:end-1})
case 5
if numel(in)==2 && islogical(in{1}), if in{1} colorbar, else colorbar off, end
else
colorbar(in{1:end-1})
end
otherwise
error('MATL:runtime', 'MATL run-time error: unrecognized last input');
end
Expand Down
Binary file modified help.mat
Binary file not shown.
Binary file modified spec/MATL_spec.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion spec/funDefTable/funDefTable.tex
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
\matl{G} & 0--1 ($^\sqcup$ / 0) & 0-- ($^\sqcap$) & paste from user-input clipboard G. If $0$ input arguments: addresses all levels. If $1$ input argument: addresses specified level. In either of those cases, if clipboard G has no levels one user-input is implicitly taken to fill the first level \\
\matl{XG} & 1-- (1 / 2) & 0 & \matlab+plot+. Calls \matlab+drawnow+ to update figure immediately. With one input, or with several inputs the second of which is a string: if the first input is complex (even with zero imaginary part), \matlab+axis equal+ is also called. \\
\matl{YG} & 2-- (2 / 3) & 0 & \matlab+imwrite+, \matlab+imagesc+, \matlab+image+ or \matlab+imshow+. (i) If last input is a scalar: \matlab+0+ corresponds to \matlab+imwrite+, \matlab+1+ to \matlab+imagesc+, \matlab+2+ to \matlab+image+ and \matlab+3+ to \matlab+imshow+. The corresponding function is called with the remaining inputs. (ii) If last input is numeric or logical and not a scalar: \matlab+imshow+ is called with all inputs. (iii) If last input is char: \matlab+imwrite+ is called with all inputs. (i, iii) For \matlab+imwrite+, the first input of type char is interpreted as file name. If it has no extension '.png' is added; if it's empty it is replaced by 'image.png'; and if non existent 'image.png' is used as final input. (i, ii, iii) For \matl{imshow} and \matl{imwrite}, if the second input is logical it is converted to \matlab+double+. If it is numeric, has the shape of a colormap, and has some entry greater than $1$, it is normalized by converting to \matlab+uint8+, then to \matlab+double+, and then dividing by $255$. For \matlab+imagesc+ and \matlab+image+, the function call is followed by \matlab+axis ij, axis image+. For \matlab+imagesc+, \matlab+image+ and \matlab+imshow+, \matlab+drawnow+ is called to update figure immediately \\
\matl{ZG} & 1-- (2 / 3) & 0--1 (0) & Depending on numeric last input, calls a graphic function or \matlab+format+ with the remaining inputs. $0$: \matlab+format+. $1$: \matlab+axis+. Calls \matlab+drawnow+ to update figure immediately. Flag strings in first to second-last inputs can be replaced by numbers, as follows: 1: \matlab+'equal'+, 2: \matlab+'image'+, 3: \matlab+'square'+, 4: \matlab+'ij'+, 5: \matlab+'xy'+, 6: \matlab+'normal'+, 7: \matlab+'off'+, 8: \matlab+'on'+, 9: \matlab+'tight'+, 10: \matlab+'manual'+, 11: \matlab+'fill'+, 12: \matlab+'auto'+, 13: \matlab+'vis3d'+. $2$: \matlab+colormap+. If the first input is numeric, has the shape of a colormap, and has some entry greater than $1$, it is normalized by converting to \matlab+uint8+, then to \matlab+double+, and then dividing by $255$. With $3$ inputs (including the last input 2), the second input specifies colormap size. With $0$ outputs, calls \matlab+drawnow+ to update figure immediately. $3$: \matlab+hold+. Flag strings in first input can be replaced by numbers, as follows: 1: \matlab+'on'+, 2: \matlab+'off'+. $4$: \matlab+grid+. Flag strings in first input can be replaced by numbers, as follows: 1: \matlab+'on'+, 2: \matlab+'off'+. \\
\matl{ZG} & 1-- (2 / 3) & 0--1 (0) & Depending on numeric last input, calls a graphic function or \matlab+format+ with the remaining inputs. $0$: \matlab+format+. $1$: \matlab+axis+. Calls \matlab+drawnow+ to update figure immediately. Flag strings in first to second-last inputs can be replaced by numbers, as follows: 1: \matlab+'equal'+, 2: \matlab+'image'+, 3: \matlab+'square'+, 4: \matlab+'ij'+, 5: \matlab+'xy'+, 6: \matlab+'normal'+, 7: \matlab+'off'+, 8: \matlab+'on'+, 9: \matlab+'tight'+, 10: \matlab+'manual'+, 11: \matlab+'fill'+, 12: \matlab+'auto'+, 13: \matlab+'vis3d'+. $2$: \matlab+colormap+. If the first input is numeric, has the shape of a colormap, and has some entry greater than $1$, it is normalized by converting to \matlab+uint8+, then to \matlab+double+, and then dividing by $255$. With $3$ inputs (including the last input 2), the second input specifies colormap size. With $0$ outputs, calls \matlab+drawnow+ to update figure immediately. $3$: \matlab+hold+. Flag strings in first input can be replaced by numbers, as follows: 1: \matlab+'on'+, 2: \matlab+'off'+. $4$: \matlab+grid+. Flag strings in first input can be replaced by numbers, as follows: 1: \matlab+'on'+, 2: \matlab+'off'+. $5$: \matlab+colorbar+. If the first input is logical (not necessarily scalar) it activates or deactivates the colorbar \\
\matl{H} & 0 & 0-- ($^\dagger$) & paste from clipboard H \\
\matl{XH} & 0-- (1 / 2) & 0 & copy to clipboard H \\
\matl{YH} & 1-- (2 / 4) & 0 & Depending on numeric last input, calls a plotting function with the remaining inputs. $0$: \matlab+plot3+. $1$: \matlab+surf+. $2$: \matlab+mesh+. $3$: \matlab+stem+. $4$: \matlab+stairs+. $5$: \matlab+bar+. After that, \matlab+drawnow+ is called to update figure immediately \\
Expand Down

0 comments on commit f9707fb

Please sign in to comment.