[英]Problems in using vtkCubeAxesActor() instance. (Number representing, and contamination)
我有三個問題。
一季度。 在上圖中,僅 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();'''
int vtkCubeAxesActor::LabelExponent(double min, double max) { ... // // 確定 10 的冪以縮放軸標簽。 // double range = (fabs(min) > fabs(max) ? fabs(min) : fabs(max)); 雙 pow10 = log10(范圍);
const double eformat_cut_min = -1.5; const double eformat_cut_max = 5.0; // 原點為 3.0 1000 change 5 (10000) ... }
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.