Vous suivez désormais cette soumission
- Les mises à jour seront visibles dans votre flux de contenu suivi
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails
<b>NB: As of R2014b this functionality is built into MATLAB axes using the 'XTickLabelRotation' property.</b>
This function rotates the x-tick labels on a plot. An arbitrary angle can be specified for the text and the label justification adjusts appropriately to ensure the labels lie below the ticks. The axes font properties are preserved in the labels, which will update in response to font changes. Changes to the axes limits are also handled.
Main features:
* Arbitrary angle of rotation
* Justification adjusts appropriately for the specified angle
* Axes font property changes are reflected
* Labels move correctly when zooming and panning
As with other functions that achieve the same result, this works by replacing the xtick labels with text objects. Handles to the created text objects are returned for you to tinker with.
Citation pour cette source
Ben Tordoff (2026). rotateXLabels( ax, angle, varargin ) (https://fr.mathworks.com/matlabcentral/fileexchange/27812-rotatexlabels-ax-angle-varargin), MATLAB Central File Exchange. Extrait(e) le .
Remerciements
Inspiré par : Rotate XTick Labels for multi-axes
A inspiré : XYrotalabel - rotate X-axis and Y-axis labels, Shaded Correlation Table, Machine Learning with MATLAB
Informations générales
- Version 1.5.0.1 (18,1 ko)
Compatibilité avec les versions de MATLAB
- Compatible avec toutes les versions
Plateformes compatibles
- Windows
- macOS
- Linux
| Version | Publié le | Notes de version | Action |
|---|---|---|---|
| 1.5.0.1 | Updated license |
||
| 1.5.0.0 | * On MATLAB R2014b, just use XTickLabelRotation instead |
||
| 1.4.0.0 | Improve behavior when "cla" is called on the axes. |
||
| 1.3.0.0 | Switch to using data coordinates internally to allow printing to work. Please keep the old version in case this breaks something else! |
||
| 1.2.0.0 | Should now honour the "XAxisLocation" property of the axes. |
||
| 1.1.0.0 | Switch to using normalized units for labels to prevent loss of accuracy with hundreds/thousands of labels. |
||
| 1.0.0.0 |
