calcticks

버전 1.1.0.0 (9.72 KB) 작성자: John Barber
Calculate ticks and ticklabels for specified limits, orientation and text size.
다운로드 수: 1.1K
업데이트 날짜: 2011/3/29

라이선스 보기

CALCTICKS calculates tick locations and generates tick labels for specified axis limits, orientation and text size. If not specified, CALCTICKS will use the limits and other properties of the current axes or supplied axes handle. Additional input parameters let the user control the style and displayed precision of the tick labels. CALCTICKS can calculate ticks for both linear and log-scaled axes.

CALCTICKS finds ticks at 'nice' intervals between the upper and lower data limits. In most cases, the interval and number of ticks chosen by CALCTICKS will not result in overlapping tick labels, unlike the values used by the MATLAB axes in 'auto' mode. Additionally, the user has some control over the displayed numerical precision of the tick labels, unlike the MATLAB default behavior.

Note that CALCTICKS does not include a mechanism to either draw the calculated ticks or to set the axes' tick and tick label properties. It simply returns a vector of ticks and a cell array of tick labels.

I have attempted to avoid problems due to numerical precision. The calculated ticks should never be outside of the original limits, and will fall exactly on the limits where possible.

Comments, bug reports and suggestions for improvement are welcome. The current scoring algorithm used to determine the best interval is somewhat convoluted. However, as noted above, the results are often superior to MATLAB's default behavior in that overlapping tick labels are a rare occurrence.

인용 양식

John Barber (2024). calcticks (https://www.mathworks.com/matlabcentral/fileexchange/30671-calcticks), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
도움

줌: quivermc

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

- Fixed bug that caused log-scale ticklabels to be truncated
- Improved interval selection for log-scale ticks

1.0.0.0