Help with change curve line color from MATLAB
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I use following code:
CurveObjectToday = TheChartObject.Chart.SeriesCollection.NewSeries;
CurveObjectToday.Name = 'T'; % curve legend
% Select data for the curve
XRange = DataSheet.Range([Contract_Col, num2str(StartRow)...
,':',Contract_Col, num2str(EndRow)]);
YRange = DataSheet.Range([M2MBasisToday_Col, num2str(StartRow)...
,':',M2MBasisToday_Col, num2str(EndRow)]);
CurveObjectToday.XValues = XRange;
CurveObjectToday.Values = YRange;
CurveObjectToday.Type = 4;
CurveObjectToday.Format.Line.ForeColor.RGB = 3; % red
The curve was plotted, but the color was not changed to the 'red' as I expected. ANy suggestion? Thanks a lot.
2 Kommentare
Andrew Newell
am 18 Mär. 2011
Where did you get TheChartObject from? I can't find any documentation on it.
Antworten (1)
Jan
am 18 Mär. 2011
Please try this:
CurveObjectToday.Format.Line.ForeColor.RGB = RGB(255, 0, 0); % red
2 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!