Commit ff7f87a1 authored by Alessandro Genova's avatar Alessandro Genova
Browse files

Increase the font size of the axis label

parent 3c6be725
set(TestAxes2_ARGS
-E 0
)
set(TestChartUnicode_ARGS set(TestChartUnicode_ARGS
DATA{../Data/Fonts/DejaVuSans.ttf} DATA{../Data/Fonts/DejaVuSans.ttf}
-E 25 -E 25
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "vtkStringArray.h" #include "vtkStringArray.h"
#include "vtkRenderWindow.h" #include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h" #include "vtkRenderWindowInteractor.h"
#include "vtkTextProperty.h"
#include <vector> #include <vector>
...@@ -33,28 +34,28 @@ int TestAxes2(int , char * []) ...@@ -33,28 +34,28 @@ int TestAxes2(int , char * [])
// Set up a 2D scene, add an XY chart to it // Set up a 2D scene, add an XY chart to it
vtkNew<vtkContextView> view; vtkNew<vtkContextView> view;
view->GetRenderWindow()->SetSize(100, 100); view->GetRenderWindow()->SetSize(200, 200);
vtkNew<vtkAxis> axisVertical; vtkNew<vtkAxis> axisVertical;
int i =0; int i =0;
axisVertical->LogScaleOn(); axisVertical->LogScaleOn();
axisVertical->SetPoint1(vtkVector2f(90, 8)); axisVertical->SetPoint1(vtkVector2f(180, 16));
axisVertical->SetPoint2(vtkVector2f(90, 92)); axisVertical->SetPoint2(vtkVector2f(180, 184));
axisVertical->SetPosition(vtkAxis::LEFT); axisVertical->SetPosition(vtkAxis::LEFT);
// Exercise some of the API in the axis API. // Exercise some of the API in the axis API.
axisVertical->SetNotation(vtkAxis::SCIENTIFIC_NOTATION); axisVertical->SetNotation(vtkAxis::SCIENTIFIC_NOTATION);
axisVertical->SetPosition(vtkAxis::LEFT); axisVertical->SetPosition(vtkAxis::LEFT);
axisVertical->SetPrecision(6); axisVertical->SetPrecision(0);
axisVertical->SetRange(0.1, 1000000.); axisVertical->SetRange(0.1, 1000000.);
axisVertical->SetRangeLabelsVisible(true); axisVertical->SetRangeLabelsVisible(true);
// axisVertical->SetRangeLabelFormat("%3.1f"); axisVertical->GetLabelProperties()->SetFontSize(24);
view->GetScene()->AddItem(axisVertical); view->GetScene()->AddItem(axisVertical);
axisVertical->Update(); axisVertical->Update();
// Let's create a few axes, and place them on the scene. // Let's create a few axes, and place them on the scene.
......
b92f77a5d210f8bec5ee915c6da116a6 cf56fa726e644c73d22a57d9e11c74c7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment