Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Custom Markers : Numbers inscribed in circles

Asked by Sree Srinivasan on 18 Aug 2013

This is regarding a ANN post-test regression plot (in which the target data are compared with the ANN predictions). The 45 degree (x = y) line plots data versus data; the predictions are usually given solid-circle markers. So, if the predictions are perfect, all the markers will fall on the 45 degree line.

Instead of solid-circle markers, I want clear-circle markers in which are inscribed the serial number of the data point (e.g. 1, 2, 3, etc.)

That way, the reader can quickly see which data points are being predicted perfectly and which are not.

0 Comments

Sree Srinivasan

Products

No products are associated with this question.

1 Answer

Answer by Image Analyst on 18 Aug 2013

You'll have to use the rectangle() function to make the circles, and then use text() to create the number labels that go inside the circles.

1 Comment

Sree Srinivasan on 21 Aug 2013

Thanks, but there is a simpler alternative:

plot(training_targets, training_outputs, 'ok', 'MarkerSize', 10); grid on; hold on

strValues = strtrim(cellstr(num2str(r_trn(:))));

text(training_targets,training_outputs,strValues, 'HorizontalAlignment','center', 'VerticalAlignment','middle', 'fontsize', 8 );

Note: r_trn is the vector of the indices of the data points.

Image Analyst

Contact us