How do I change 1e-5 on a loglog axis out of scientific notation?
Al momento, stai seguendo questa domanda
- Vedrai gli aggiornamenti nel tuofeed del contenuto seguito.
- Potresti ricevere delle e-mail a seconda delle tuepreferenze per le comunicazioni.
Si è verificato un errore
Impossibile completare l'azione a causa delle modifiche apportate alla pagina. Ricarica la pagina per vedere lo stato aggiornato.
0 voti
Condividi un link a questa domanda
Risposta accettata
0 voti
Condividi un link a questa risposta

7 Commenti
Condividi un link a questo commento
Condividi un link a questo commento
This is closer for sure. Is there a way to kill the trailing zeros using the compose function?
- @Walter Roberson: As you observed, the Exponent has no effect when in log-scale. This is in the documentation, but it is quite easy to miss, as it is strapped onto the end of another sentence at the end of the property description. "If the axis has a log scale, then the Exponent property has no effect."
- The value of the YTickLabel property is always going to be either a character matrix or a cell-array. If you set the value to be a numeric vector, then the value is immediately converted into a cell-array using an internal algorithm that cannot be customized and is not impacted by any other settings in MATLAB. Ultimately, the internal code is calling the C++ function snprintf.
- If you want to specify how the numbers are converted into strings, then you need to do the conversion yourself, as you did above using either compose, sprintf, or num2str. Each of those commands have their own unique behaviors. I believe num2str is a very similar algorithm to what is used by the YTickLabel property, but I'm not certain of that.
- I couldn't find a solution that automatically trimmed the trailing zeros without requiring some manual intervention (such as using strip, as you did above).
Condividi un link a questo commento
Più risposte (0)
Categorie
Scopri di più su Axis Labels in Centro assistenza e File Exchange
Tag
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
