How can i change the linestyle in the parcorr function?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Till Hasselmann
el 6 de Sept. de 2021
Comentada: Ive J
el 6 de Sept. de 2021
Hey guys,
I am currently working on a Time series Analysis which Data is stored in a 20604x3 double Array called Y_mat. The Code is working how i want it to, however i am trying to change the red bubbled linestyle of the partial autocorrelation properties to be just normal lines. This is for visibility reasons, because my standard deviation is so small that the confidence intervall bounds are hard to make up under the big red bubbles.
I tried experementing with something like set(gcf, 'linestyle', '-') but it doesnt seem to be the right approach at all. I am linking two images, the first is the outcome of my code and the second is an example from a paper how the lines should look like.
The Problem is probably not a big Deal, but i wasnt able to find an established solution in the Forums.
I have one little bonus question aswell, but this one isnt a important point for me. Is it possible that the confidence bounds touch the y-Axis, they are currently beginning at Lag 1.
Thank you so much!
figure
parcorr(Y_mat(:,3))
set(gca,'YTick',[-0.3 0 0.5 1 ])
title('PACF Offshore')
ylabel('partielle Autokorrelation')
xlabel('Lag')
lg = legend("Partielle Autokorrelationsfunktion(Lag)", "95% Konfidenzintervall");
0 comentarios
Respuesta aceptada
Ive J
el 6 de Sept. de 2021
Editada: Ive J
el 6 de Sept. de 2021
This should work:
[~, ~, ~, h] = parcorr(randn(1000, 1));
set(gca,'YTick',[-0.3 0 0.5 1 ])
title('PACF Offshore')
ylabel('partielle Autokorrelation')
xlabel('Lag')
lg = legend("Partielle Autokorrelationsfunktion(Lag)", "95% Konfidenzintervall");
sh = findobj(h, 'Type', 'Stem'); % find PACF stem plot
sh.Marker = 'none'; % remove the marker
sh.LineWidth = 1.5;
sh.Color = 'k';
2 comentarios
Ive J
el 6 de Sept. de 2021
My pleasure.
You can of course modify line width or color as well (my edited answer).
Más respuestas (0)
Ver también
Categorías
Más información sobre Title en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!