Ask Your Question

Revision history [back]

Plot boxes have jumpy xy ranges in log scale

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
click to hide/show revision 2
retagged

Plot boxes have jumpy xy ranges in log scale

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