Skip to content

Instantly share code, notes, and snippets.

@mvanzulli
Last active March 15, 2022 02:24
Show Gist options
  • Save mvanzulli/af0dac277b0ba84fbfc4ee89a416020a to your computer and use it in GitHub Desktop.
Save mvanzulli/af0dac277b0ba84fbfc4ee89a416020a to your computer and use it in GitHub Desktop.
templateOctavePlots
```octave
% plot
figBars = figure(1) ;
h = clf;
y = [executionTimes2plotConssistent' executionTimes2plotLumped'] ;
h = bar (y);
% sat colours and labels
set (h(1), "facecolor", violet);
set (h(2), "facecolor", green);
% set (fig3(3), "facecolor", "b");
labx = xlabel('Number of elements'); laby = ylabel('Execution time [s]') ;
labelsx = [strcat( num2str( numElementsVecToPlot(1) ), ' element' );...
strcat( num2str( numElementsVecToPlot(2) ), ' elements' );...
strcat( num2str( numElementsVecToPlot(3) ), ' elements' )];
legend('consstient', 'lumped' )
set(legend, 'linewidth', axislw, 'fontsize', legendFontSize, 'location', 'northwest' ) ;
set(gca, 'linewidth', axislw, 'fontsize', curveFontSize, 'XTickLabel', labelsx ) ;
set(labx, 'FontSize', axisFontSize); set(laby, 'FontSize', axisFontSize) ;
namefigBars = strcat(printPathExample, 'execTime') ;
print(figBars, namefigBars, '-depslatex');
close(1)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment