Git commit 6dbfa50cf1cc85c846f29e298c6da625d13eda3a by Alexander Semke. Committed on 30/04/2016 at 18:46. Pushed by asemke into branch 'master'. Restored the desired behaviour for axes. M +0 -1 src/backend/worksheet/plots/cartesian/Axis.cpp M +8 -8 src/backend/worksheet/plots/cartesian/CartesianPlot.cpp http://commits.kde.org/labplot/6dbfa50cf1cc85c846f29e298c6da625d13eda3a diff --git a/src/backend/worksheet/plots/cartesian/Axis.cpp b/src/backend/w= orksheet/plots/cartesian/Axis.cpp index 76dfa84..c3eb503 100644 --- a/src/backend/worksheet/plots/cartesian/Axis.cpp +++ b/src/backend/worksheet/plots/cartesian/Axis.cpp @@ -157,7 +157,6 @@ void Axis::init(){ d->title->graphicsItem()->setParentItem(graphicsItem()); d->title->graphicsItem()->setFlag(QGraphicsItem::ItemIsMovable, false); d->title->graphicsItem()->setAcceptHoverEvents(false); - d->title->setText(this->name()); if (d->orientation =3D=3D AxisVertical) d->title->setRotationAngle(270); d->titleOffsetX =3D Worksheet::convertToSceneUnits(2, Worksheet::Point); = //distance to the axis tick labels d->titleOffsetY =3D Worksheet::convertToSceneUnits(2, Worksheet::Point); = //distance to the axis tick labels diff --git a/src/backend/worksheet/plots/cartesian/CartesianPlot.cpp b/src/= backend/worksheet/plots/cartesian/CartesianPlot.cpp index 6d9199a..6096974 100644 --- a/src/backend/worksheet/plots/cartesian/CartesianPlot.cpp +++ b/src/backend/worksheet/plots/cartesian/CartesianPlot.cpp @@ -170,8 +170,8 @@ void CartesianPlot::initDefault(Type type){ axis->setMajorTicksNumber(6); axis->setMinorTicksDirection(Axis::ticksIn); axis->setMinorTicksNumber(1); - axis->setLabelsPosition(Axis::LabelsOut); - //axis->title()->setText(QString()); + axis->setLabelsPosition(Axis::NoLabels); + axis->title()->setText(QString()); = axis =3D new Axis("y axis 1", Axis::AxisVertical); addChild(axis); @@ -199,8 +199,8 @@ void CartesianPlot::initDefault(Type type){ axis->setMajorTicksNumber(6); axis->setMinorTicksDirection(Axis::ticksIn); axis->setMinorTicksNumber(1); - axis->setLabelsPosition(Axis::LabelsIn); - //axis->title()->setText(QString()); + axis->setLabelsPosition(Axis::NoLabels); + axis->title()->setText(QString()); = break; } @@ -251,11 +251,11 @@ void CartesianPlot::initDefault(Type type){ = Axis *axis =3D new Axis("x axis 1", Axis::AxisHorizontal); addChild(axis); - axis->setPosition(Axis::AxisRight); + axis->setPosition(Axis::AxisCentered); axis->setStart(-0.5); axis->setEnd(0.5); axis->setMajorTicksDirection(Axis::ticksBoth); - axis->setMajorTicksNumber(10); + axis->setMajorTicksNumber(6); axis->setMinorTicksDirection(Axis::ticksBoth); axis->setMinorTicksNumber(1); axis->setArrowType(Axis::FilledArrowSmall); @@ -263,11 +263,11 @@ void CartesianPlot::initDefault(Type type){ = axis =3D new Axis("y axis 1", Axis::AxisVertical); addChild(axis); - axis->setPosition(Axis::AxisLeft); + axis->setPosition(Axis::AxisCentered); axis->setStart(-0.5); axis->setEnd(0.5); axis->setMajorTicksDirection(Axis::ticksBoth); - axis->setMajorTicksNumber(10); + axis->setMajorTicksNumber(6); axis->setMinorTicksDirection(Axis::ticksBoth); axis->setMinorTicksNumber(1); axis->setArrowType(Axis::FilledArrowSmall);