lets_plot.position_dodgev#

lets_plot.position_dodgev(height=None)#

Adjust position by dodging overlaps to the side.

Parameters:
heightfloat

Dodging height, when different to the height of the individual elements. This is useful when you want to align narrow geoms with taller geoms. The value of height is relative and typically ranges between 0 and 1. Values that are greater than 1 lead to overlapping of the objects.

Returns:
FeatureSpec

Geom object position specification.

Notes

Adjust position by dodging overlaps to the side.

Examples

 1from lets_plot import *
 2LetsPlot.setup_html()
 3data = {
 4    'xmin': [0.2, 4.6, 1.6, 3.5],
 5    'xmax': [1.5, 5.3, 3.0, 4.4],
 6    'y': ['a', 'a', 'b', 'b'],
 7    'c': ['gr1', 'gr2', 'gr1', 'gr2']
 8}
 9ggplot(data, aes(y='y', color='c')) + \
10    geom_errorbar(aes(xmin='xmin', xmax='xmax'), height=0.1, size=2, \
11                  position=position_dodgev(height=0.2))