New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix stairs and area legend #602
Conversation
Changes look good, judging by the code. Travis stays green as well. To avoid regressions, it would be good to adapt an existing ACID test so that this behavior is covered. What do you think? |
AAAAAArrrrrghhhhh!!! The Octave hash for stairs fails. I need some input so that maybe we can fix it in a easy way @egeerardyn, @PeterPablo? Would you know off the top of your head where are the newlines problems coming from and why BEGIN/END file headers are missing? Also, maybe we could call the whole ACID with a stricter float format, e.g. '%8.3', or truncate small values to 0 (I know this one is dangerous, but it might work for our subset of tests)? |
I am currently on the road. Did you run 'testHeadless' in your octave? |
@PeterPablo Yes, that's how I produced the new hash. |
@okomarov The begin/end headers are something that are added in I think it's a bit weird that the EOLs are a problem only at those locations. We use The numerical format is indeed also a problem: I already reduced it to |
From the top of my head this might be influencable by '%x.xF' or '%x.xf'.
Let's have a look into comparing values we print out against' eps'. This
will touch many parts of the code, so as Egon wrote, we should do this
separately.
Kind wishes
|
My bad for the newlines, I just copy-pasted from https://travis-ci.org/matlab2tikz/matlab2tikz/builds/57505018 instead than from the log. So, the problem is only numerical. |
Unfortunately I can confirm the numerical difference between Windows Octave and Mac Octave. Mac behaves like Travis and Windows shows the same different digit like yours. As such, I would say, please commit the Hash that Travis expects. The test will thus pass on Travis, but not for you locally. We should then look into resolving this problem, e.g. by further reducing the output format -- as you suggested. Here are my findings concerning
octave WIN:
MATLAB R2014b MAC:
So at least |
Look, what I found here. This makes the win output look like:
-- no more leading zero in the exponent :-) The last decimal is still wrong and as such we should adapt the |
'%+08.3f' ensures: * leading sign * same position of decimal point * less precission to prevent possible issues between different environments (see PR matlab2tikz#602 for discussion)
'%+08.3f' ensures: * leading sign * same position of decimal point * less precission to prevent possible issues between different environments (see PR matlab2tikz#602 for discussion) remove leading zero and sign leading zeros caused uncompilable `0000+nan`.
'%+08.3f' ensures: * leading sign * same position of decimal point * less precission to prevent possible issues between different environments (see PR matlab2tikz#602 for discussion) remove leading zero and sign leading zeros caused uncompilable `0000+nan`.
'%8.3f' ensures: * same position of decimal point * less precision to prevent possible issues between different environments (see PR matlab2tikz#602 for discussion) NOTE: do not add leading zeros as this will cause `000+nan` which is not parseable by pgfplots
👍 |
Fixes #601 - stairSeries and areaSeries not toggling off legend entries if not in the legend.