[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [labplot] src/backend/worksheet/plots/cartesian: Restored the desired behaviour for axes.
From:       Alexander Semke <alexander.semke () web ! de>
Date:       2016-04-30 19:47:31
Message-ID: E1awarT-000727-Js () scm ! kde ! org
[Download RAW message or body]

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/worksheet/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 == AxisVertical) d->title->setRotationAngle(270);
 	d->titleOffsetX = Worksheet::convertToSceneUnits(2, Worksheet::Point); //distance \
to the axis tick labels  d->titleOffsetY = 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 = 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 = 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 = 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);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic