File Exchange

image thumbnail

cbdate

version 1.0.0.0 (93.6 KB) by Chad Greene
colorbar date formatting.

6 Downloads

Updated 10 Nov 2014

View License

This function formats colorbar ticks as dates strings.

Syntax
cbdate
cbdate(h)
cbdate(datenums)
cbdate(datenums,dateformat)
cbdate(datestrs)
cbdate('horiz')
h = cbdate(...)

Description
cbdate converts tick marks of current colorbar to date strings.

cbdate(h) specifies a colorbar handle h on which to perform cbdate. If no handle is specified, cbdate will try to find a current colorbar.

cbdate(datenums) specifies datenums to set as tick marks.

cbdate(datenums,dateformat) specifies date formatting as described in the documentation for datestring. For example, 'mmm yyyy' will print date strings as Nov 2014.

cbdate(datestrs) specifies date strings to use as colorbar ticks.

cbdate('horiz') must be declared if the colorbar is horizontal (pre-R2014b).

h = cbdate(...) returns a colorbar handle h.

Comments and Ratings (5)

This was exactly what I needed! Thank you!

Neil Rogers

patrick

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

cbdate/html/