After using R(D)COM and Matlab R-link for a while, I do not recommend it. The COM interface has trouble parsing many commands and it is difficult to debug the code. I recommend using a system command from Matlab as described in the <a href="http://rwiki.sciviews.org/doku.php?id=tips:callingr:matlab">R Wiki</a>. This also avoids having to install RAndFriends.
The allfitdist function for normally distributed data return 'rayleigh' as best fit distribution! So weird as it is an example included in file.
commands: data = normrnd(5,3,1e4,1); [D PD] = allfitdist(data,'PDF'); D(1)
output: ans =
NLogL: 2.4515e+04 - 1.5959e+03i
BIC: 4.9038e+04 - 3.1919e+03i
AIC: 4.9031e+04 - 3.1919e+03i
AICc: 4.9031e+04 - 3.1919e+03i
Paramci: [2x1 double]
Support: [1x1 struct]
Thank you for the feedback and nice rating.
It's funny to notice that the
thing you like about the way matlab creates legends is exactly why I dislike it.
I agree that when you change the color of a graph, the default legend will change automatically and this can surely be handy. However to me this often spells trouble and was the reason to do it differently. I therefore opted for a legend that is NOT directly coupled to the data.
I'll try to seewhat I can do,however,I seriously doubt I can do a lot since the default legend is not linked to a specific axes via a property or something.
But I'll give it a go.
Please check the updates or my comments in case it is not possible or practically feasible.
Thanks Joris for the nice submission.
It would be nice if it the zooming would also work with the default legend. I like this default Matlab legend because it's coupled to the data, when i edit it, the colors change too. But when pressing the zoom button, normal legends don't disappear.
14 Aug 2014
Exports figures nicely to a number of vector & bitmap formats.