Modifying the contour plot from ksdensity
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
J T
el 24 de En. de 2020
Comentada: J T
el 28 de En. de 2020
Hello,
I am trying to modify the 2D contour figure automatically generated by ksdensity for my bi-variate data.
I used the following lines, where ``data`` is a matrix size of 16000-by-2:
>> ksdensity(data,'PlotFcn','contour');
I used ``gcf``, ``gca``, ``findobj`` to extract the current figure, axis, object, however, I couldn't modify any of the properties I need. For example, setting it to a filled contour ('fill', 'on'), turning off the lines ('Linestyle','none') and increasing the level.
Does anyone know how to do this? Thanks!
0 comentarios
Respuesta aceptada
Samatha Aleti
el 28 de En. de 2020
Hi,
As you are directly plotting using “ksdensity” function, you may not be able to change properties of plot. Instead of that, you may get the probability density estimate “f” (let) using “ksdensity” function and then plot separately. By doing this, you can use the plot object to change the properties as you need.
Below is the syntax:
[M,c] = contour( f );
c.LineStyle = '-.' ;
Refer the following documentation links for further details:
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!