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.
plot based on a value
Respuesta aceptada
30 comentarios
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1319500/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1319505/image.png)
- Extending the lower limit of y axis = -1 and that I am marking as green, red or grey squares on the x axis based on 3 conditions mentioned below:
- The table from which I am using is of size (100x5) which has 2 columns across which I am making a comparison first and then the values:
- If column D < column E then mark x where y=-1 as grey
- If column D >= column E then make additional check if any of A,B,C pointer above 1(limit), then mark x where y=-1 as red
- If column D >= column E then make additional check if any of A,B,C pointer not above 1(limit), then mark x where y=-1 as green
- Trying to add the red,green,grey squares to legend as well
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1319565/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1319680/image.png)
- Getting away from the y=-1 axis, setting a limit as y=0 (which means removing the points on that axis as well)
- Conditions still are the same but instead of adding a separate color coding on the y=-1 axis I am now trying to color all A,B,C in those colors based on the conditions (moving away from blue and orange) based on the limit at y=1 (Example: if the condition for D<E is satisfied then color A,B,C all in grey instead of the earlier implementation where y=-1 being grey and A,B,C having color (blue,orange) based on above or below y=1)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1325325/image.png)
- If column D < column E then mark all points A,B,C in grey
- If column D >= column E then make additional check if any of A,B,C pointer above 1(limit), then mark all A,B,C as red
- If column D >= column E then make additional check if any of A,B,C pointer not above 1(limit), then mark A,B,C as green
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1325365/image.png)
- The above plot is let's say plot 1
- There is a plot 2 with same x axis as plot 1
Más respuestas (0)
Ver también
Categorías
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!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.
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)
Asia-Pacífico
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)