How can I create a pictogram in MATLAB?
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 29 de Nov. de 2018
Respondida: MathWorks Support Team
el 9 de En. de 2019
Is it possible to create a pictogram in MATLAB?
I want to have a bar chart and for the height of the bar have 1 image.
Respuesta aceptada
MathWorks Support Team
el 29 de Nov. de 2018
You can use "imread" and "image" in a a for-loop to create a pictogram.
>> x = [1 2 3 4];
>> y = [2 4 3 2];
>> im = imread('peppers.png');
>> figure
>> hold on
>> xPos = [1 0.1];
>> yPos = [1 0.1];
>> for i = 1:numel(x)
>> xPos = xPos + 1;
>> for j = 1:y(i)
>> image(xPos, yPos, im)
>> yPos = yPos + 1;
>> end
>> yPos = [1 0.1];
>> end
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Convert Image Type en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!