fancybox

A more flexible way to change the appearance of the axis box
63 Downloads
Aktualisiert 20. Jan 2016

Lizenz anzeigen

Key features:
- Plot the axis box as a dashed line, dotted line, etc.
- Plot tick marks, tick labels, and axis box as different colors
- Most properties of the original axis are preserved
SYNTAX:
fancybox('PropertyName',propertyvalue,...)
hb = fancybox('PropertyName',propertyvalue,...)
PROPERTIES: (Name-value pairs)
'XTickColor' - Color of the X Tick markers
'k'(default)| RGB Triplet | Color String | 'none'
'YTickColor' - Color of the Y Tick Markers
'k'(default)| RGB Triplet | Color String | 'none'
'TickColor' - Color of both X and Y markers (overrides any
assignment to YTickColor or XTickColor
Any property of the patch class (the axis box takes on these properties)

DESCRIPTION:
fancybox('PropertyName',propertyvalue,...)
Plots a more flexible axis box outline, with the option to change
color, linestyle, thickness and alpha of the box. Tick markers can
be plotted as seperate different colours. Returns a patch handle
for the box outline if an output is specified

EXAMPLE:

figure('color','w')
subplot(2,2,1)
z = peaks;
contour(z,11)
xlabel('x')
ylabel('y')
fancybox('EdgeColor','r','linestyle',':','TickColor','r')
subplot(2,2,2)
x = linspace(-2,2,101);
plot(x,2*x.^3-3*x+1);
fancybox('EdgeColor','b','linestyle','--')
subplot(2,2,3)
z = magic(15);
contourf(z)
set(gca,'ticklength',[0.03 0])
hb = fancybox('EdgeColor','g','linestyle','-.','linewidth',3,'YTickColor','g');
subplot(2,2,4)
plot(x,sin(x),'r:')
fancybox('EdgeAlpha',0.5)

This function has been tested on MATLAB 2015a and 2015b

Zitieren als

Delyle Polet (2024). fancybox (https://www.mathworks.com/matlabcentral/fileexchange/55019-fancybox), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R2015a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Polygons finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0

Changed file title