以下是代码:
val = {{2, 1}, {-1, -2}};
img_test =
Show[BarChart3D[val, ChartLayout -> "Grid",
Method -> {"Canvas" -> None}, Axes -> True,
BoxRatios -> {1, 1, 0.6},
ChartLabels -> {{"x1", "p1"}, {"x1", "p1"}},
LabelStyle -> Directive[Black, Large], PlotRangePadding -> None,
ChartElementFunction -> "Cube", PlotRangePadding -> None,
ColorFunctionScaling -> False,
ColorFunction -> (Blend[{{Max[val], Lighter[Red, 1/5]}, {0,
LightGray}, {Min[val], Lighter[Blue, 1/5]}}, #] &),
FaceGrids -> {{1, 0, 0}, {0, -1, 0}},
BarSpacing -> {0, 0}, AxesEdge -> {{1, 0}, {-1, -1}, {1, 1}},
AxesStyle -> Directive[30], ImageSize -> 600, TicksStyle -> Thick,
ViewPoint -> {-Pi/3, 1, 1}]]
这是运行结果:
请问 怎么把 x1 p1 坐标 向上移,移动到z=0的水平面上?
val = {{2, 1}, {-1, -2}};
img_test =
Show[BarChart3D[val, ChartLayout -> "Grid",
Method -> {"Canvas" -> None}, Axes -> True,
BoxRatios -> {1, 1, 0.6},
ChartLabels -> {{"x1", "p1"}, {"x1", "p1"}},
LabelStyle -> Directive[Black, Large], PlotRangePadding -> None,
ChartElementFunction -> "Cube", PlotRangePadding -> None,
ColorFunctionScaling -> False,
ColorFunction -> (Blend[{{Max[val], Lighter[Red, 1/5]}, {0,
LightGray}, {Min[val], Lighter[Blue, 1/5]}}, #] &),
FaceGrids -> {{1, 0, 0}, {0, -1, 0}},
BarSpacing -> {0, 0}, AxesEdge -> {{1, 0}, {-1, -1}, {1, 1}},
AxesStyle -> Directive[30], ImageSize -> 600, TicksStyle -> Thick,
ViewPoint -> {-Pi/3, 1, 1}]]
这是运行结果:
请问 怎么把 x1 p1 坐标 向上移,移动到z=0的水平面上?