# Ylim and yoffset don't work using gv.Labels

**URL:** <https://discourse.holoviz.org/t/ylim-and-yoffset-dont-work-using-gv-labels/790>\
**Category:** GeoViews\
**Tags:** bokeh, panel, holoviews\
**Created:** [June 9, 2020, 11:30pm UTC](https://discourse.holoviz.org/t/ylim-and-yoffset-dont-work-using-gv-labels/790 "2020-06-09T23:30:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![happybearxp](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/happybearxp/32/582_2.png) [@happybearxp](https://discourse.holoviz.org/u/happybearxp)\
**Post date:** [June 9, 2020, 11:30pm UTC](https://discourse.holoviz.org/t/ylim-and-yoffset-dont-work-using-gv-labels/790/1 "2020-06-09T23:30:16Z")

</div>

I am trying to add gv.Labels on top of the gv.Points, while I found both ylim and yoffset don’t work. Is there an alternative way to set them in the Geoview plot?

In this demo, 10 random-gv points with the same Latitude (0) will be generated by clicking the button. The gv labels are used to identify the point IDs. I would like to set “ylim=(-10,10)”, without gv labels, it works, while by adding gv labels, it does not work. Also, Is there a way to set offset of the gv labels, just like what we can do with hv.Labels? See my demo code below. Thanks in advance.

```auto
import geoviews as gv
import random
import panel as pn
from bokeh.io import curdoc

gv.extension('bokeh')

geo_points_demo_opts = dict(
            size=15.,
            line_width=1.5,
            selection_alpha=0.8, nonselection_alpha=0.1, 
            responsive=True, height=150,
            toolbar='left',
            default_tools=['pan','box_select','reset','wheel_zoom'], active_tools =['box_select'],
            # padding=(0.1, 0.2),
            #xaxis=None, 
            #yaxis=None,
            bgcolor="whitesmoke",
            ylim=(-10, 10),
            title='')

generate_plot_button = pn.widgets.Button(name='Generate Plot', button_type='primary', width=180, height=50)# top , right, bottom, left
geo_points_demo = gv.Points(dict(Longitude = [0], Latitude = [0])).opts(responsive=True, height=180, toolbar='left')
geo_points_demo_view = pn.Column(generate_plot_button, geo_points_demo, width_policy='max', height_policy='max')

def update(event):
    geo_points_demo_df={}
    geo_points_demo_df['Longitude']=random.sample(range(90), 10)
    geo_points_demo_df['Latitude']=[0]*10
    geo_points_demo_df['ID']=list(range(1,11))
    geo_points_demo = gv.Points(geo_points_demo_df, kdims=['Longitude', 'Latitude'], vdims=['ID']).opts(**geo_points_demo_opts)
   
    soil_boring_points_demo_label = gv.Labels(geo_points_demo).opts(
                                                                    text_font_style = 'bold', #'normal', 'italic', 'bold'
                                                                    text_font_size='6pt', 
                                                                    text_color='black', 
                                                                    text_alpha=1.0,
                                                                    ylim=(-10, 10)
                                                                    )
    
    geo_points_demo_view[1].object = (geo_points_demo*soil_boring_points_demo_label).opts(ylim=(-10, 10))

generate_plot_button.param.watch(update, 'clicks')

layout = geo_points_demo_view.get_root()
print(geo_points_demo_view[1].object)

curdoc().add_root(layout)
curdoc().title = "geo_points_demo"

```
