Borrar filtros
Borrar filtros

Fraction in label of a scatter plot

22 visualizaciones (últimos 30 días)
Milan Kumar
Milan Kumar el 16 de Jul. de 2019
Comentada: Milan Kumar el 16 de Jul. de 2019
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 comentarios
KALYAN ACHARJYA
KALYAN ACHARJYA el 16 de Jul. de 2019
Is it axis label?
Milan Kumar
Milan Kumar el 16 de Jul. de 2019
No. The plot label.

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 16 de Jul. de 2019
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';

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by