MCPcopy Index your code
hub / github.com/plotly/plotly.py / prep_xy_axis

Function prep_xy_axis

plotly/matplotlylib/mpltools.py:517–536  ·  view source on GitHub ↗
(ax, props, x_bounds, y_bounds)

Source from the content-addressed store, hash-verified

515
516
517def prep_xy_axis(ax, props, x_bounds, y_bounds):
518 xaxis = dict(
519 type=props["axes"][0]["scale"],
520 range=list(props["xlim"]),
521 showgrid=props["axes"][0]["grid"]["gridOn"],
522 domain=convert_x_domain(props["bounds"], x_bounds),
523 side=props["axes"][0]["position"],
524 tickfont=dict(size=props["axes"][0]["fontsize"]),
525 )
526 xaxis.update(prep_ticks(ax, 0, "x", props))
527 yaxis = dict(
528 type=props["axes"][1]["scale"],
529 range=list(props["ylim"]),
530 showgrid=props["axes"][1]["grid"]["gridOn"],
531 domain=convert_y_domain(props["bounds"], y_bounds),
532 side=props["axes"][1]["position"],
533 tickfont=dict(size=props["axes"][1]["fontsize"]),
534 )
535 yaxis.update(prep_ticks(ax, 1, "y", props))
536 return xaxis, yaxis
537
538
539def mpl_dates_to_datestrings(dates, mpl_formatter):

Callers

nothing calls this directly

Calls 4

convert_x_domainFunction · 0.85
prep_ticksFunction · 0.85
convert_y_domainFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected