Plotting negative and positive values with different colors in a graph
Mostrar comentarios más antiguos
I have a correlation coefficients matrix consisting of positive and negative values and I need to plot the graph for that matrix separating positive and negative values with different colors to distinguish them.
Respuestas (1)
Shrestha Kumar
el 31 de Mayo de 2018
0 votos
Hi,
You can find your answer here-
https://in.mathworks.com/matlabcentral/answers/285397-plotting-negative-values-with-blue-and-positive-values-with-red
2 comentarios
Chandrika Avvaru
el 31 de Mayo de 2018
Shrestha Kumar
el 31 de Mayo de 2018
Ok, so what you can do is that you can create two separate linear arrays of positive and negative numbers from the matrix and then plot each array with different color.
Categorías
Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!