Skip to content

Range padding possibly discards the log axis properties #2789

Description

@ilayn

This similar to #2431 but in the log-log axis context. If I plot the following

x = np.arange(80,2500)
s = ColumnDataSource(data=dict(x=x,y=y))
dd = figure(x_axis_type='log',y_axis_type='log')
dd.line(x,x)
show(dd)

I get
first

which is a bit strange for the auto padding. But if I plot the following

x = np.arange(1,20)
s = ColumnDataSource(data=dict(x=x,y=y))
dd = figure(x_axis_type='log',y_axis_type='log')
dd.line(x,x**2)
show(dd)

second

In general, I'm trying to understand the reference guide properly. For example, if I read the DataRange1d part, I understand that it has a range-padding but then is it the default range object for the plots ?

If I want to explicitly supply an auto range with a different padding value should I go about it as
x_r = DataRange1d(range_padding=0.2) and then supply this to the figure x_range attribute? It would be really nice if this can be supplied directly to x_range.

Finally, I think in the DataRange1d docs, it should be called the fraction but not the percentage as A percentage of the total range size to add as padding to the range start and end. sounds like I should enter 20 instead of 0.2 but that makes the range huge.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions