Is there a way to programmatically obtain the list of marker and line styles available for plotting in Octave?
Ideally, I would do something like
mslist = whatever_function_for_marker_styles;
lslist = whatever_function_for_line_styles;
for i = 1:np
plot(x, y(i,:), 'marker', mslist(i), 'linestyle', lslist(i))
endfor
Notes:
- I would add some
modfunctions to cycle across the lists. - I know the size of both lists may not be the same, so they may shift from one another upon cycling.
The easiest way would be to get the symbols from the manual and put them in a cell array:
You can loop over them with a standard for-loop and access them by index using curly brackets, e.g. lslist{i}. The symbols are in Section 15.2.1 of the manual (https://octave.org/doc/v6.1.0/Two_002dDimensional-Plots.html#Two_002dDimensional-Plots). An ordinary vector would work for mslist instead of a cell array as all the symbols are single characters, but not for lslist where some of them are two characters long.