marker

How to set a fixed/static size of circle marker on a scatter plot?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 14:59:07
I want to plot the location of some disks generated randomly on a scatter plot, and see whether the disks are 'connected' to each other. For this, I need to set the radius of each disk fixed/linked to the axis scale. The 's' parameter in the plt.scatter function uses points, so the size is not fixed relative to the axis. If I dynamically zoom into the plot, the scatter marker size remains constant on the plot and does not scale up with the axis. How do I set the radius so they have a definite value (relative to the axis)? Schorsch Instead of using plt.scatter , I suggest using patches.Circle

Scatterplot with different size, marker, and color from pandas dataframe

我与影子孤独终老i 提交于 2019-11-29 10:39:34
I am trying to do a scatter plot with speed over meters for each point where marker indicate different types, size indicate different weights and color indicate how old a point is over 10 minutes scale. However, I was only able to plot by size so far. Any help is highly appreciated. x = {'speed': [10, 15, 20, 18, 19], 'meters' : [122, 150, 190, 230, 300], 'type': ['phone', 'phone', 'gps', 'gps', 'car'], 'weight': [0.2, 0.3, 0.1, 0.85, 0.0], 'old': [1, 2, 4, 5, 8]} m = pd.DataFrame(x) plt.scatter(m.meters, m.speed, s = 30* m.weight) mkr_dict = {'gps': 'x', 'phone': '+', 'car': 'o'} meters speed

Map Marker icon animation (Google Maps API V2 for Android)

混江龙づ霸主 提交于 2019-11-29 08:49:02
On a custom event, I need my Marker to update its drawable 6 times (basically, I want the Marker to grow and shrink 3 times with a delay of 0.5 s between each growth and each shrink) so it notifies the user of said event. Is there any way to achieve this without actually having to remove the Marker and adding it again with a different Drawable ? KlasE I'm afraid there is no way to do it today without actually removing the marker and adding it again with another drawable. I have just done so myself in an attempt to create a progress bar. It works, but it is an awkward way of doing it. Click

MapView Marker shadow

梦想与她 提交于 2019-11-29 05:14:22
I am adding different markers to my map... Drawable drawable = app1.getResources().getDrawable(R.drawable.test); drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight()); OverlayItem overlayitem2 = new OverlayItem(mark, "Test", "t"); overlayitem2.setMarker(drawable); app1.mapOverlay.addOverlay(overlayitem2); app1.mapOverlays.add(app1.mapOverlay); that works but the shadow is at the wrong position. I use this: int w = drawable.getIntrinsicWidth(); int h = drawable.getIntrinsicHeight(); drawable.setBounds(-w / 2, -h, w / 2, 0); I know this has been answered a while

How to add a Marker/Pin on an ImageView Android?

99封情书 提交于 2019-11-29 01:34:21
问题 I would like to ask on how to implement or add a marker on an imageView. I rendered an SVG using svglib and used a customImageView so that I can zoom and pan around the image. here is my code on how i used my customImageView @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { SVG svg; switch (mNum) { case 1: svg = SVGParser.getSVGFromResource(getResources(), R.raw.t1); break; case 2: svg = SVGParser.getSVGFromResource(getResources(), R

How to specify the size of the icon on the Marker in Google Maps V2 Android

半腔热情 提交于 2019-11-28 20:22:50
In may app i use Map from Google Maps V2 and in this map i am trying to add markers each Marker with an icon, but the marker is taking the size of the icon which is making the icon looks flue. How can i specify the size of the marker in dp so that i can control how it looks like on the map Currently i think we cannot change the marker size, so u can add marker image in drawable and re-size something like this:, int height = 100; int width = 100; BitmapDrawable bitmapdraw=(BitmapDrawable)getResources().getDrawable(R.mipmap.marker); Bitmap b=bitmapdraw.getBitmap(); Bitmap smallMarker = Bitmap

leaflet.js - Set marker on click, update position on drag

房东的猫 提交于 2019-11-28 19:38:43
for a small project I am working on, I need to be able to place a marker on a leaflet.js powered image-map and update the position of this marker, if it gets dragged. I use the following code to try this, but it fails. I get the error 'marker not defined'. I don't know why it's not working - maybe you guys could help me out? ;) function onMapClick(e) { gib_uni(); marker = new L.marker(e.latlng, {id:uni, icon:redIcon, draggable:'true'}; map.addLayer(marker); }; marker.on('dragend', function(event){ var marker = event.target; var position = marker.getLatLng(); alert(position); marker.setLatLng(

Google Maps Api 3 Remove Selected Marker Only

ぃ、小莉子 提交于 2019-11-28 16:34:22
I've 2 function as below: function addMarker() { marker = new google.maps.Marker({ position: Gpoint, map: map, draggable: true, animation: google.maps.Animation.DROP }); map.panTo(Gpoint); google.maps.event.addListener(marker, "rightclick", function (point) { showContextMarker(point.latLng); } ); $('.contextmenu').remove(); }; function delMarker() { marker.setMap(null); $('.contextmenu').remove(); }; So, as may understand I have a Context Menu having "Delete Marker" option on it. I am binding a "rightclick" listener during adding a marker, to show this menu. Everything is working without any

where I can find the little red dot image used in google map?

白昼怎懂夜的黑 提交于 2019-11-28 16:25:44
I am looking for the red dots showing here I can find find plenty of push pins and shadows in various place. But cannot find this little dot.... Could someone help me? Are you just trying to copy out the style of the markers? If you are using Chrome just press F12 for developer tools, go to resources, then choose Frames->Maps->Images. All of the images are shown there along with their locations. https://maps.gstatic.com/mapfiles/markers2/red_markers_A_J2.png I believe those are what you are talking about? If you are talking about the really tiny little red dots, they appear to be part of the

Google Map click marker by external link

此生再无相见时 提交于 2019-11-28 14:33:54
Google map, on click external link target marker. Find fiddle demo below. find fiddle demo google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { infowindow.setContent(locations[i][0]); infowindow.open(map, marker); map.setZoom(9); map.setCenter(marker.getPosition()); } })(marker, i)); function triggerClick(i) { google.maps.event.trigger(markers[i],'click'); } <ul class="nav"> <li><a href="javascript:triggerClick(0)">location1</a></li> <li><a href="javascript:triggerClick(1)">location2</a></li> <li><a href="javascript:triggerClick(2)">location3</a></li> <li>