How do I change 1e-5 on a loglog axis out of scientific notation?
Ahora está siguiendo esta pregunta
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
Se ha producido un error
No se puede completar la acción debido a los cambios realizados en la página. Vuelva a cargar la página para ver el estado actualizado.
0 votos
Comparte un enlace a esta pregunta
Respuesta aceptada
0 votos
Comparte un enlace a esta respuesta

7 comentarios
Comparte un enlace a este comentario
Comparte un enlace a este comentario
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).
Comparte un enlace a este comentario
Más respuestas (0)
Categorías
Más información sobre Axis Labels en Centro de ayuda y File Exchange.
Etiquetas
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- 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)
