Plot 2D is missing some Data Points

1 回表示 (過去 30 日間)
Si
Si 2013 年 7 月 22 日
This is a strange situation for me. I have never seen this before.
I am just using a simple plot command for the following data:
x = [0.6935 0.6947 0.6959 0.697 0.6982 0.6994 0.7006 0.7017 0.7029 0.7041 0.7052 0.7064 0.7076 0.7088 0.7099 0.7111 0.7123];
f = [ 2.7433E+307 2.7042E+307 2.7477E+307 2.6278E+307 19.09965479 1.000000028 1 1 1 1 1 1 1.000000006 1 1 1 1];
p0 = plot(x, f, '-rx');
ylim([0 30]);
xlim([0.6935 0.7123]);
However the point at (x,f) = (0.6982, 19.1) is completely missing and the line does not pass through it. When I use Data cursor and use the keyboard arrows to move through the points on the line. This point shows up but there is not marker displayed for it.
This is really quite puzzling and would suggest some sort of a bug.
Any ideas? Please help.
I am using Matlab R2012b
  2 件のコメント
dpb
dpb 2013 年 7 月 22 日
I see same thing w/ default renderer of 'painters'
Changing to 'opengl' or 'zbuffer' changes behavior
Appears to be a computational problem owing to the magnitude of the values in the first of the data vector. If I even reduce the E307 to E300 the marker shows up.
Si
Si 2013 年 7 月 22 日
Thanks very much for your reply.
How do you change to 'opengl' or 'zbuffer'?
Thanks again

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

採用された回答

dpb
dpb 2013 年 7 月 22 日
編集済み: dpb 2013 年 7 月 22 日
set(gcf,'renderer',['opengl'|'zbuffer'])
Use one or other, of course, not literal...
set(gcf)
or
set(gca)
is a very useful "trick" to know to quickly find out what a possible handle property is and acceptable responses for enumerated ones.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by