Plot boxes have jumpy xy ranges in log scale

asked 2015-04-24 14:36:38 +0200

slelievre gravatar image

updated 2019-08-29 18:50:02 +0200

FrédéricC gravatar image

Note: this is an attempt to concisely rephrase the issue at ask-sage question 26623.

Plotting in log scale, the bounding box doesn't adjust well to xmin, xmax, ymin, ymax.

It seems that plot bounding boxes are set with increments not adapted to log scale.

The following example illustrates this jumpiness in certain ranges of values.

opt = { 'ymin': 1, 'ymax': 25, 'scale': ('loglog', 10), 'frame': True }
def p(a): return plot(x, xmin=a, xmax=25, **opt)
for a in (1.2, 2, 3, 4): p(a).show() # poor xmin for bbox
for a in (4.5, 7, 10, 14): p(a).show() # poor xmax for bbox
for a in (12, 14, 20, 23): p(a).show() # poor xmin and xmax
edit retag flag offensive close merge delete

Comments

slelievre gravatar imageslelievre ( 2019-05-11 22:34:11 +0200 )edit