0

HI there i want to ask about how to show values of data that i sorted in an array to the plot? i've try use text but not work

 for sv=1:trialsv
        figure('Name',sprintf('Figure Sensitivitas ke-%d',sv),'NumberTitle','off')
        set(gcf,'renderer','zbuffer');
        for js=1:3
            fprintf('\nSensitivitas dengan metode %s di posisi F(%d,%d)\n',methodnames{js},inputv(sv),inputt(sv))
            for tr=1:trial
                methods{tr}=sprintf('Nilai uji ke-%d = %f\n',tr,MatrixIterF{tr,js}(vi(sv),ti(sv)));
                fprintf(methods{tr});
                plMatrixIterF(tr,js)=MatrixIterF{tr,js}(vi(sv),ti(sv));
            end
            plot(sce(1:trial,scenario),plMatrixIterF(1:trial,js), strcat(colors(length(colors)-js+1),syms(js)));
            strValues=strtrim(cellstr(num2str([sce(1:trial,scenario) plMatrixIterF(1:trial,js)],'(%d,%d)')));
            text(sce(1:trial,scenario),plMatrixIterF(1:trial,js),'VerticalAlignment','bottom');
            hold all
        end
        title(strcat('Plot sensitivitas terhadap ',scetype(scenario),sprintf(' di posisi F(%d,%d)',inputv(sv),inputt(sv))))
        xlabel(xlabels)
        ylabel('Nilai Undeveloped Proyek')
        legend(methodnames,'Location','NorthEast');
        grid on
    end
timgeb
  • 76,762
  • 20
  • 123
  • 145
Ariearie
  • 1
  • 1
  • Do you want to use a selfdefined axis? or do you want to show "text/values" as annotation in your plot? – The Minion Jun 05 '14 at 07:23
  • I want to show the value from the result that i've save in location plMatrixIterF(1:trial,js) ` strValues=strtrim(cellstr(num2str([sce(1:trial,scenario) plMatrixIterF(1:trial,js)],'(%d,%d)'))); text(sce(1:trial,scenario),plMatrixIterF(1:trial,js),'VerticalAligAlignment','bottom');` – Ariearie Jun 05 '14 at 07:41
  • i'm confuse how ho write the command to show the value on the mark point on the graph... so i try add these 2 lines but i thought it's wrong, – Ariearie Jun 05 '14 at 08:03
  • almost the same problem : http://stackoverflow.com/questions/19062382/matlab-drawing-points-and-show-values but not solved yet – Ariearie Jun 05 '14 at 08:08
  • DO you look for sth. like this: http://www.mathworks.de/de/help/matlab/creating_plots/adding-text-to-graphs.html ? – The Minion Jun 05 '14 at 08:48
  • yeah right, thanks a lot for your help :D; i've solved it after trying.. – Ariearie Jun 05 '14 at 09:26
  • text(sce(1:trial,scenario),plMatrixIterF(1:trial,js),sprintf('(%0.f)',plMatrixIterF(1:trial,js)) work for me !! thanks all – Ariearie Jun 05 '14 at 09:45

0 Answers0