question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sizing_mode breaks GMap alignment

See original GitHub issue

Hi!

I’m using bokeh 0.12.5rc3, Python 3.6.1, Chrome 57.0.2987.110 on Ubuntu 16.10. Using this script:

from __future__ import print_function

from bokeh.util.browser import view
from bokeh.document import Document
from bokeh.embed import file_html
from bokeh.models.glyphs import Patch
from bokeh.models import (
     GMapPlot, Range1d, ColumnDataSource, GMapOptions, WheelZoomTool, PanTool
)
from bokeh.resources import INLINE

from bokeh.sampledata.us_states import data as states

API_KEY = "YOUR API KEY"

map_options = GMapOptions(lat=39.5501, lng=-105.7821, map_type="roadmap", zoom=6)

plot = GMapPlot(x_range=Range1d(), y_range=Range1d(), map_options=map_options,
                api_key=API_KEY, sizing_mode='scale_width', width=300, height=100)

source = ColumnDataSource(data=dict(x=states['CO']["lons"], y=states['CO']["lats"]))

patch = Patch(x="x", y="y", line_color="red", fill_color=None)
plot.add_glyph(source, patch)

doc = Document()
doc.add_root(plot)

plot.add_tools(WheelZoomTool(), PanTool())

filename = "maps.html"
with open(filename, "w") as f:
    f.write(file_html(doc, INLINE, "Google Maps Example"))
view(filename)

At first sight there’s no problem with the map:

image

but if i do anything that resizes the GMap (like resizing the window, or inspecting an element) the polygon get’s misaligned:

image

if i return the gmap to its initial width the misalignment seems to dissapear, but just panning the map shows that this ‘re alignment’ it’s a kind of glitch:

image

Maybe this a corner case of, or it’s related to #2964, but that was closed since there wasn’t any code to reproduce the bug, so i’m opening this one instead. Sorry if this was already reported (i searched but didn’t find any similar)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
canavandlcommented, Apr 4, 2017

@syonekura I think we closed this issue by accident, I’m sorry about that. Thanks for the quality bug report. We hope to address a bunch of layout issues in the subsequent 0.12.6 release, so we’ll look to resolve this.

0reactions
syonekuracommented, Jun 5, 2017

@bryevdv Sure, i’ll be waiting for the next release then

Read more comments on GitHub >

github_iconTop Results From Across the Web

GMAP-GSNAP/README at master - GitHub
If there is only a single alignment, this value is 0. XO: Output type. GSNAP categorizes its alignments into output types,. as follows....
Read more >
gmap — Bokeh 3.0.3 Documentation
The gmap function is similar to figure(), but configures a plot that also has ... Self alignment can be overridden by the parent...
Read more >
GMAP: a genomic mapping and alignment program for mRNA ...
Abstract. Motivation: We introduce GMAP, a standalone program for mapping and aligning cDNA sequences to a genome. The program maps and aligns a ......
Read more >
gmapR: Use the GMAP Suite of Tools in R - Bioconductor
GMAP (Genomic Mapping and Alignment Program) is particularly suited to relatively long mRNA and EST sequences such as those that are obtained from...
Read more >
GMAP aligner issues - Biostars
Hello All,. I am using GMAP aligner to map the Oxford nanopore reads to hg19 genome. I obtained the pre-built genome. I have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found