Custom Markers : Numbers inscribed in circles

17 views (last 30 days)
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.

Answers (1)

Image Analyst
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
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!