1

我有三个问题。

在此处输入图像描述

Q1。在上图中,只有 X 轴显示实际数字(:300,400 等),而 Z 轴仅显示伴随 'Z(x10^3)​​' 的比率数字。如何同时显示 Y、Z 轴的实际数字?

Q2。在背景中,显示了“受污染”的东西(:字符?)。我怎么能压制它?

Q3。当我将大数字设置为像这样的界限时,

cubeAxesActor.SetBounds(0, 1100, 0, 1100, 0, 1100)

代替

cubeAxesActor.SetBounds(polyD_src.GetBounds())  

实际数字未显示,并且显示了沿轴的比率数字(0.1、0.2、~1.0)。如何限制数字以显示其实际数字?

部分代码就是这个。谢谢!

    cubeAxesActor = vtk.vtkCubeAxesActor()
    self.renderer.AddActor(cubeAxesActor)     
    axes = vtk.vtkAxesActor()

    cubeAxesActor.SetUseTextActor3D(1)
    cubeAxesActor.SetBounds(polyD_src.GetBounds())        
    cubeAxesActor.SetCamera(self.renderer.GetActiveCamera())
    cubeAxesActor.GetTitleTextProperty(0).SetFontSize(1)

    cubeAxesActor.GetTitleTextProperty(0).SetColor(tickColor)
    cubeAxesActor.GetLabelTextProperty(0).SetColor(tickColor)
    cubeAxesActor.GetTitleTextProperty(1).SetColor(tickColor)
    cubeAxesActor.GetLabelTextProperty(1).SetColor(tickColor)
    cubeAxesActor.GetTitleTextProperty(2).SetColor(tickColor)
    cubeAxesActor.GetLabelTextProperty(2).SetColor(tickColor)
    cubeAxesActor.GetXAxesLinesProperty().SetColor(tickColor)
    cubeAxesActor.GetYAxesLinesProperty().SetColor(tickColor)
    cubeAxesActor.GetZAxesLinesProperty().SetColor(tickColor)
    cubeAxesActor.GetXAxesGridlinesProperty().SetColor(tickColor)
    cubeAxesActor.GetYAxesGridlinesProperty().SetColor(tickColor)
    cubeAxesActor.GetZAxesGridlinesProperty().SetColor(tickColor)
    cubeAxesActor.XAxisMinorTickVisibilityOff()
    cubeAxesActor.YAxisMinorTickVisibilityOff()
    cubeAxesActor.ZAxisMinorTickVisibilityOff()      

    cubeAxesActor.SetXTitle("Y");
    cubeAxesActor.SetYTitle("Z");
    cubeAxesActor.SetZTitle("X");
    cubeAxesActor.SetFlyModeToStaticEdges()

    transform = vtk.vtkTransform()
    transform.Translate(0.0, 0.0, 0.0)
    transform.RotateZ(-90)
    transform.RotateY(-90)

    self.renderer.ResetCamera()

    self.renderer.SetBackground(backgroundColor)
    self.vtkWidget.GetRenderWindow().AddRenderer(self.renderer)        
    self.iren = self.vtkWidget.GetRenderWindow().GetInteractor()

    self.frame_vis.setLayout(self.bl)
    self.show()
    self.iren.Initialize();'''
4

1 回答 1

0
于 2021-08-19T00:45:25.297 回答