chromosomeplot conflict with legend

When I use matlab's chromosomeplot with addtoplot flag turned on, I cannot get legends on my figure.
  1. If I execute chromosomeplot first, then calls to legend thereafter does not produce a legnd.
  2. If I execute legend first, then a subsequent call to chromosomeplot produces the error "Can not add chromosome to this figure for it contain too many axes"

回答 (1 件)

Arthur Goldsipe
Arthur Goldsipe 2014 年 10 月 16 日

0 投票

Can explain in more detail what exactly you're trying to do? It's not clear to me exactly what you are trying to add a legend for and what you expect to appear in a legend. At least by default, the chromosomeplot doesn't have any information that would be added to a legend. But if you're trying to combine a chromosomeplot with some other plot that includes a legend, he's one way to do it:
plot(rand(3))
legend('a', 'b', 'c')
hs_cytobands = cytobandread('hs_cytoBand.txt')
chromosomeplot(hs_cytobands, 1, 'AddToPlot', gca)

カテゴリ

質問済み:

2014 年 10 月 15 日

回答済み:

2014 年 10 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by