Настроить фон в сюжете в Mathematica - PullRequest
0 голосов
/ 04 сентября 2011

Учитывая:

ListPlot[Range[10], 
         Background -> Gray, 
         PlotLabel -> "I don`t want the background here !"]

enter image description here

Есть ли способ применить фон исключительно к фактической зоне построения?

Не на оси,не за этикеткой.Так в основном к прямоугольнику {{0,0}, {10,10}} в этом случае?

РЕДАКТИРОВАТЬ: Можем ли мы сделать то же самое, используя PolarListPlot?

Используя Sjoerd Solution на От декартовой диаграммы к полярной гистограмме с использованием Mathematica :

dalist = {{21, 22}, {26, 13}, {32, 17}, {31, 11}, {30, 9}, 
          {25,12}, {12, 16}, {18, 20}, {13, 23}, {19, 21}, 
          {14, 16}, {14,22}, {18, 22}, {10, 22}, {17, 23}}

ScreenCenter = {20, 15}

ListPolarPlot[{ArcTan[##],EuclideanDistance[##]} & @@@ (# - ScreenCenter & /@ dalist), 
               PolarAxes -> True, PolarGridLines -> Automatic, Joined -> False, 
               PolarTicks -> {"Degrees", Automatic}, 
               BaseStyle -> {FontFamily -> "Arial", FontWeight -> Bold, 
               FontSize -> 12}, PlotStyle -> {Red, PointSize -> 0.02}]

enter image description here

Ответы [ 4 ]

10 голосов
/ 04 сентября 2011

Вы можете сделать что-то вроде этого:

ListPlot[Range[10], PlotLabel -> "I don`t want the background here !",
  Frame -> {True, True, False, False}, AxesOrigin -> {0, 0}, 
 Prolog -> {Gray, Rectangle[Scaled[{0, 0}], Scaled[{1, 1}]]}]

enter image description here

5 голосов
/ 04 сентября 2011

Вы можете использовать Labeled как в

Labeled[
  ListPlot[Range[10], Background -> Gray,
  PlotLabel -> "I don`t want the background here !"],
  "So place the label here", Top]
2 голосов
/ 04 сентября 2011

Вы можете сделать:

Show[Graphics[{Pink, Rectangle[{0, 0}, {10, 10}]}], 
 ListPlot[Range[10]], Axes -> True, AspectRatio -> 1/2]

enter image description here

Редактировать

Возможно, лучше

c = RandomInteger[100, 10];
ListPlot[c,  Prolog -> {Pink, Rectangle[{0, Min@c}, {Length@c, Max@c}]}]
2 голосов
/ 04 сентября 2011
ListPlot[Range[10], 
         Background -> Gray, 
         PlotLabel -> Style["I don`t want the background here !",
                            Background -> White ]]

result

...