Also, if you happen to have very uneven axis ranges (one small, one very big), the behaviour can be somewhat odd with the cursor jumping between points seemingly at random.
h = plot(linspace(1,7000,5),linspace(10,30,5)); pathManipulator(h, 'nocheck')
with one axis at 7000 ticks and the other at 5. As you can see, when you try to move one marker past another left/right, the cursor switches to the other marker even though the distance seems fairly large. This does not happen when passing the marker up/down.
My solution is to take the axis ranges into account and scale the vertical and the horizontal distances accordingly before calculating the pythagoras distance.
Excellent! Makes a world of difference when handling string > 1 MB. I use Kevin Bartlett's "TCP/IP Communications in Matlab" (http://www.mathworks.se/matlabcentral/fileexchange/24524-tcpip-communications-in-matlab) which can optionally utilize your java classes and it's lizard fast!
First off, if a line is initiated (with this script) twice in a row, it's old styling is not recoverable since the Userdata already has been overwritten. That's a minor issue and could be prevented by checking if a line has been initiated and simply do LineManipulator(lineHandle, 'off') before initiating it once more.
The bug however, is when using either 'pushx' or 'pushy'. The pushing part works fine, but the points are unable to move freely in the other direction. So for e.g 'pushx' I simply added
on line 195. Similarly you add the corresponding piece of code on line 205.
From what I've gathered, Google switched from counting usage per domain to per user instead. So basically if you use Static Maps on your website, a single user using up all of the quota won't affect any other users, only that particular user.
Other than that, great piece of software! It was easy to get compatible with older Matlab (2003) and works like a charm under Matlab R2008b.
As for future requests, caching (i.e renaming and not removing) tiles would be awesome! I realize that storing tiles might violate Google's terms, but temporary would certainly do the trick!
Hi Zohar, thanks for sharing this wonderful piece of code. I have a query, I'm trying to plot data points which are mapped on to corresponding co-ordinates. The problem is, the number of data points are large (around 15000 - 35000 points). I'm able to plot these data points on the map, but facing issues in zooming/panning speed. The map reaction becomes too slow whenever I try to zoom in or out with the data points on the map. Is there any limitations in the number of points on the map or should I check for any other parameter to overcome this issue.. Thanks
21 Oct 2014
Plot a google map on the background of the current figure using the Static Google Maps API.
Pietro - such a feature can be added quite easily.
In the meantime, if you have the mapping toolbox, you can use a few lines of code to achieve this:
load toolbox\map\mapdisp\private\regions.mat worldRegions