Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for changing marker size according to #254
- Loading branch information
1 parent
171e9aa
commit 8f8f5a9
Showing
1 changed file
with
60 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8f8f5a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This factor 9 is somewhat debatable. Check out
matlab2tikz_acidtest(60)
:8f8f5a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woa; how did I miss that? All the other tests were just fine (or at least with no visual difference as the one in your example).
But I see now running more tests with larger entries of
SizeData
that the relationship doesn't seem to be as linear as it first seemed like.The documentation states that the default size of the markers for the scatter plots is
36
, whereas for markers in "regular" line plots it is6
(it's obviously not 6:1, and not 9:1 either, so....). Can try to send an e-mail to Matlab and see if they care to share the relationship between the two.8f8f5a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drgz: If we apply an predictable size progression, I think it should be quite straightforward to identify the scaling, e.g. sizes 1 through 20. But probably the scaling is dependent on the actual marker used, as TikZ and MATLAB use slightly different definitions of the marker size.
8f8f5a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MarkerSize
: [6 7 8 9 10 .... ]SizeData
: [36 54 72 90 108 ...]As for between Matlab and TikZ I think that should be taken care of by
[sData, dummy] = translateMarkerSize(m2t, matlabMarker, sData);
Relation is
18*(n+1)/(n+5) : 1
,or the other way around depending on how you see it, starting withn=1
.What if we scale with a function
f(x)=18*x-72
?8f8f5a9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it;
[sData, dummy] = translateMarkerSize(m2t, matlabMarker, 18*sData./(sData+72));
https://dl.dropboxusercontent.com/u/13366636/acid.pdf