現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
How do I convert a linear scale array to a logarithmic without getting negative values?
2 ビュー (過去 30 日間)
古いコメントを表示
回答 (1 件)
madhan ravi
2020 年 7 月 6 日
Replace < 1 with nan.
14 件のコメント
farzad
2020 年 7 月 6 日
this is what I do , I take the log immediately when I am plotting I doubt I can do what you say, how do I do that ?
f=barh(y, log(x), 'basevalue', min(x));
farzad
2020 年 7 月 7 日
thank you very much for your answer. yes this is right but : I think something is wrong.
Because : here we are actually taking the logarithm of the X axis values. so if the maximum is 10^ 4 , the max on the logarithmic will be 4.
but I meant only changing the scale of showing the values , therefore , not touching the actual X values, but changing the X values. the same way it is done in Excel.
farzad
2020 年 7 月 7 日
please see the attached. the distances of the lines is in logarithmic scale. this is how you can do in Excel :
farzad
2020 年 7 月 7 日
Thank you ! it worked on scaling , but all the bars disappeared ! I wanted to use the log scale to see the small bars better !
farzad
2020 年 7 月 8 日
Any opinions on why the bars disappear ? the divisions start from 10^-1 to 10^4 and I should have a graph in this range
参考
カテゴリ
Help Center および File Exchange で Line Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
アジア太平洋地域
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)