フィルターのクリア

Fraction in label of a scatter plot

22 ビュー (過去 30 日間)
Milan Kumar
Milan Kumar 2019 年 7 月 16 日
コメント済み: Milan Kumar 2019 年 7 月 16 日
hi,
I want to add a fraction label in scatter plot. Please help.
clear all;
clc;
Base=[0.01 0.00 1.46
0.05 0.00 1.46
0.1 1.94 1.22
0.15 1.63 1.15
0.2 1.47 1.11
0.25 1.38 1.09
0.3 1.31 1.07];
h=zeros(1,2);
h(1)=scatter(Base(:,1),Base(:,2),30,'b','s','LineWidth',2,'DisplayName','\frac{X}{Y}');
hold on;
h(2)=scatter(Base(:,1),Base(:,3),30,'b','+','LineWidth',2,'DisplayName','\frac{W}{Z}');
ylim([0,2]);
  2 件のコメント
KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 7 月 16 日
Is it axis label?
Milan Kumar
Milan Kumar 2019 年 7 月 16 日
No. The plot label.

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

採用された回答

Walter Roberson
Walter Roberson 2019 年 7 月 16 日
h = gobjects(1,2);
h(1) = scatter(Base(:,1), Base(:,2), 30, 'b', 's', 'LineWidth', 2, 'DisplayName',' $\frac{X}{Y}$');
hold on;
h(2) = scatter(Base(:,1), Base(:,3), 30, 'b', '+', 'LineWidth', 2, 'DisplayName', '$\frac{W}{Z}$');
lh = legend('show');
lh.Interpreter = 'latex';
  1 件のコメント
Milan Kumar
Milan Kumar 2019 年 7 月 16 日
Thank you.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAxis Labels についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by