Puzzling plot color behaviour
Mostrar comentarios más antiguos
I have two curves stored in the workspace. I use exactly the same commands to plot them:
newred = [0.8500 0.3250 0.0980];
subplot(1,2,1)
plot(gridd(1:ind), likk(1:ind),'color', newred, 'linewidth', 3)
subplot(1,2,2)
plot(x, approx,'color', newred, 'linewidth', 3)
the result is the following (9.1.0.441655 (R2016b))

They look different. This also happen with any other color that I choose. There will be difference in color between the two and the second will have the tiny white spots on the line.
What am i missing here?
3 comentarios
Mohamed Abdalmoaty
el 27 de Mayo de 2017
Walter Roberson
el 27 de Mayo de 2017
Can you attach your data?
Mohamed Abdalmoaty
el 27 de Mayo de 2017
Respuesta aceptada
Más respuestas (1)
John D'Errico
el 27 de Mayo de 2017
Editada: John D'Errico
el 27 de Mayo de 2017
1 voto
You already know the reason! It is due to the number of dots plotted.
Each dot has a white center, a lower case o. Only the perimeter of the dot has any color. If you have only a few dots, then you see the white centers. If there are so many dots that they overlap and cover the centers of the neighboring dots, then all you see is red.
If you mi white and red, the color appears a bit washed out. So the sparse line tends to look a bit closer to a pastel.
3 comentarios
Mohamed Abdalmoaty
el 27 de Mayo de 2017
Editada: Mohamed Abdalmoaty
el 27 de Mayo de 2017
John D'Errico
el 27 de Mayo de 2017
The arrays in the .mat file are not in fact what you plotted. Different variable names. In fact, the curves are not exactly what you show in the plot you posted.
When I try to plot the two curves in the .mat file, in fact, I see no difference in color, but that is also in the current MATLAB release.
So you can claim what you wish, but I've seen far too often that people make claims about what they think they did and what they really did.
Mohamed Abdalmoaty
el 27 de Mayo de 2017
Categorías
Más información sobre Title en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!