2012-03-30 5 views
2

Ich möchte die ChartLabels unterhalb des BarChart setzen, aber wenn ich die Option 'Below' benutze, werden die ChartLabels systematisch geschnitten.Mathematica - BarChart3D: Wie man die ChartLabels richtig anzeigt?

Hier ist mein Code & und die Figur:

data10000 = Import["results2_10000.dat"][[;; ;; 1]] 
{{0.315364, 564.876}, {4.7499, 10.4077}, {6.12522, 8.51407}, {1.26482, 
    55.5532}, {628.23, 1.58626}, {0.383874, 610.822}, {}} 

figure3D10000 = BarChart3D[{SetPrecision[data10000[[1]], 2], 
SetPrecision[data10000[[2]], 2], 
SetPrecision[data10000[[3]], 2], 
SetPrecision[data10000[[4]], 2], 
SetPrecision[data10000[[5]], 2], 
SetPrecision[data10000[[6]], 2] 
}, 
ChartLabels -> 
{Placed[{ 
    Text[Style["contiguous", 11]], 
    Text[Style["chunks(79,157)", 11]], 
    Text[Style["chunks(100,100)", 11]], 
    Text[Style["chunks(1000,1000)", 11]], 
    Text[Style["chunks(10000,1)", 11]], 
    Text[Style["chunks(1,10000)", 11]] 
    }, 
Below, 
Rotate[#, Pi/2.5] &], 
None 
}, 
LabelingFunction -> Above, 
ChartElementFunction -> "ProfileCube", 
ChartLegends -> {Placed[{ 
    Text[Style["line per line", 11]], 
    Text[Style["column per column", 11]] 
    }, 
Top] 
}, 
AxesLabel -> {None, None, Style["time"[s], FontSize -> 11]}, 
AxesStyle -> {None, None, {Directive[13], Thickness -> 0.004}}, 
PlotRange -> {All, All} 
] 

Leider kann ich die Figur nicht veröffentlicht, sobald ich ein neuer Benutzer bin. Aber wenn Sie diesen Code testen, werden Sie sehen, dass die Beschriftungen unter dem BarChart fast nicht sichtbar sind.

Antwort

1

Einige Verbesserungen mit imagePadding:

data10000 = {{0.315364, 564.876}, {4.7499, 10.4077}, {6.12522, 
    8.51407}, {1.26482, 55.5532}, {628.23, 1.58626}, {0.383874, 
    610.822}, {}} 

figure3D10000 = 
BarChart3D[{SetPrecision[data10000[[1]], 2], 
    SetPrecision[data10000[[2]], 2], SetPrecision[data10000[[3]], 2], 
    SetPrecision[data10000[[4]], 2], SetPrecision[data10000[[5]], 2], 
    SetPrecision[data10000[[6]], 2]}, 
    ChartLabels -> {Placed[{Text[Style["contiguous", 11]], 
     Text[Style["chunks(79,157)", 11]], 
     Text[Style["chunks(100,100)", 11]], 
     Text[Style["chunks(1000,1000)", 11]], 
     Text[Style["chunks(10000,1)", 11]], 
     Text[Style["chunks(1,10000)", 11]]}, Below, 
    Rotate[#, Pi/2.5] &], None}, LabelingFunction -> Above, 
    ChartElementFunction -> "ProfileCube", 
    ChartLegends -> {Placed[{Text[Style["line per line", 11]], 
     Text[Style["column per column", 11]]}, Top]}, 
    AxesLabel -> {None, None, Style["time [s]", FontSize -> 11]}, 
    AxesStyle -> {None, None, {Directive[13], Thickness -> 0.004}}, 
    PlotRange -> {All, All}, ImagePadding -> 110, ImageSize -> 600] 
+0

Danke Chris sehr. Es hat mein Problem gelöst! – guillaume

Verwandte Themen