Filter löschen
Filter löschen

Fill my plot with a colour

17 Ansichten (letzte 30 Tage)
P_L
P_L am 11 Feb. 2019
Kommentiert: Star Strider am 11 Feb. 2019
Hi I have made the attached image but want to fill the plot inside with the colour: [1 0.92 0.8].
Does anyone know how to do this?
Many thanks
  2 Kommentare
Geoff Hayes
Geoff Hayes am 11 Feb. 2019
harpreet - which "plot inside with colour..."? Do you mean that you want to change the white background to [1 0.92 0.8]? If so, then you would do something like
set(gca,'Color',[1 0.92 0.8])
where gca gets the current axes.
P_L
P_L am 11 Feb. 2019
Thank you!! Yes that was exactly what I wanted :)

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Star Strider
Star Strider am 11 Feb. 2019
Try this:
figure
plot(rand(1,10), rand(1,10), 'p')
set(gca, 'Color',[1 0.92 0.8])
  2 Kommentare
P_L
P_L am 11 Feb. 2019
Many thanks :)
Star Strider
Star Strider am 11 Feb. 2019
As always, my pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by