semilogy plot using 'arrayfun'

2 visualizaciones (últimos 30 días)
Debabrata Ghosh
Debabrata Ghosh el 13 de Sept. de 2020
Hello Everybody,
I have been trying to plot a cell array using 'arrayfun', and it works perfectly when I do a 'plot', but it does not seem to work for 'semilogy'. Please see the examples below. I get the correct plot for (1). But, for (2), it does not give me the semilog plot. Instead, it gives the same plot as (1). So, the plots are exactly the same for both (1) and (2), even though for (2) I use 'semilogy(x{:}......'
  1. arrayfun(@(x) plot(x{:}(:,1),x{:}(:,2),'Parent',S.ax1, 'LineWidth',2.2),S.c);
  2. arrayfun(@(x) semilogy(x{:}(:,1),x{:}(:,2),'Parent',S.ax1, 'LineWidth',2.2),S.c);
S.c is a cell array of size (1,n). 'n(>=1)' is user defined'. In this case n = 4. Basically, I am plotting 4 lines. What am I missng here? Thanks, in advance!

Respuestas (0)

Categorías

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

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by