Rounding of decimals in TikZ export
Not a Problem
I had a very old very of GeoGebra, which used to do everything I wanted.
In the current version I'm using when choosing Export as PGF/TikZ decimal numbers are 'not' rounded, but appear in full expanded form. This ensures more precision when plotting but this is usually not needed. Rounding to 3 decimals is usually more then enough.
The current export shows somthing like this:
- \begin{tikzpicture}
- \draw [line width=1.2pt] (1.,-1.)-- (4.,-1.);
- \draw [line width=1.2pt] (5.060660171779821,0.060660171779821415)-- (5.060660171779821,3.0606601717798214);
- ...
Notice how integers have a decimal point -1. instead of just -1 and the long expansion of the floating numbers.
This could be uncluttered as: (as it was in the old version 3.2).
- \begin{tikzpicture}
- \draw [line width=1.2pt] (1,-1)-- (4,-1);
- \draw [line width=1.2pt] (5.06,0.06)-- (5.06,3.06);
- ..
Choosing a rounding in the options menu doesn't change this.
It would be nice if one could choose the amount of rounding in the TikZ export.
My current GeoGebra setup:
- GeoGebra 5.0.377.0-3D (12 July 2017)
- Java: 1.8.0_121
- OS: Linux
Sorry, we won't be changing this
Okay, I respect the decision.
Since uncluttering the TikZ export is very time intensive I'm going to build my own version where I will add this option. I had a look a the code and identified the issue in *GeoGebraToPgf.java*.
Loading the project in Eclipse succeeds, but somehow the build is failing. I'll open a new bug report.
Comments have been locked on this page!