Distorted (Crayon-like) Graph Colour

12 visualizaciones (últimos 30 días)
Onn Wah Lee
Onn Wah Lee el 26 de Mzo. de 2021
Respondida: George Tucker el 18 de Mzo. de 2022
The graph that I plotted using the following line looks like crayon.
plot(this_t_vec,sq(nanmean(rep_avg(:,:,cond(plot_loop),:,:),5)),'Color',c(c_inc,:),'linewidth',2);
The colour is fine when I plot random stuff e.g. plot(rand(10)).
Your help is deeply appreciated.
  2 comentarios
darova
darova el 26 de Mzo. de 2021
What kind of help is needed?
Onn Wah Lee
Onn Wah Lee el 29 de Mzo. de 2021
Hi @darova, I want the colour to look normal instead of crayon-like. Any setting or code that I can adjust so that the graph doesnt look pixelate?

Iniciar sesión para comentar.

Respuestas (3)

Chidvi Modala
Chidvi Modala el 30 de Mzo. de 2021
The graph color is based on the value you set for the property 'Color'. Based on the given information, you are setting your 'Color' property to a variable (c_inc,:). You can set the 'Color' property to [1 0 0] for red color. You may refer to the 'Color' property in the below link
  1 comentario
Onn Wah Lee
Onn Wah Lee el 20 de Mayo de 2021
Thank you for your answer Chidvi. I reckoned the problem is with my dataset, and not the color setting. Even if I use [1 0 0], the colour is still crayon-like.

Iniciar sesión para comentar.


darova
darova el 22 de Mayo de 2021
Try linesmoothing
clc,clear
x = 0:10;
y = sin(x);
plot(x,y,'linesmoothing','on')
more information: LINK

George Tucker
George Tucker el 18 de Mzo. de 2022
I had a similar problem with slightly noisy data. It was mostly solved by setting the custom renderer of the figure to painters: (In the figure window: File>Export setup>Rendering>Tick custom renderer>Dropdown select painters (vector format) if its not the default.)

Categorías

Más información sobre Graphics Object Properties en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by