フィルターのクリア

Error while using plotyy function

1 回表示 (過去 30 日間)
Poulomi Ganguli
Poulomi Ganguli 2018 年 5 月 16 日
編集済み: the cyclist 2018 年 5 月 16 日
Hello: I am using plotyy function with indexing:
X = B_SLR(:,1); Y = B_SLR(:,2); Y1 = B_HighQ(:,4);
kdx = B_SLR(:,4) < 0.10; mdx = B_HighQ(:,4) < 0.10;
plotyy(X(kdx),Y(kdx),'bo-','lineWidth',2,'MarkerEdgeColor','b','MarkerFaceColor','b',X(kdx),Y1(mdx),'ro-','lineWidth',2,'MarkerEdgeColor','r','MarkerFaceColor','r'); hold on;
plotyy(X(kdx),Y(~kdx),'bo-','lineWidth',2,X(kdx),Y1(~mdx),'ro-'); hold on;
in which X,Y and Y1 are 10x4 matrices. I am imposing certain criteria for indexing, such as, if a particular value in column 4 in matrices Y and Y1 are less than 0.10 the markerfacecolor will be filled and if not then it will be unfilled with any color. However, while using plotyy function I am encountering foll. error:
plotyy error Argument must contain a character vector or function handle.
I am unaware of any other ways to plot secondary Y-axes other than plotyy. Any help in this regard?
  1 件のコメント
the cyclist
the cyclist 2018 年 5 月 16 日
Can you upload a MAT file with the variables, so that we can try your code ourselves?

サインインしてコメントする。

採用された回答

the cyclist
the cyclist 2018 年 5 月 16 日
編集済み: the cyclist 2018 年 5 月 16 日
Read the documentation for plotyy a bit more carefully. The first four arguments are supposed to be vectors with data.
If you have version R2016a or later, the preferred way to do this is with yyaxis.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTwo y-axis についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by