Hello,

The way figures get accumulated into html output files seems like a bug, unless I’m missing something.

In the example below, out1.html contains the first figure (the sine wave), but out2.html contains both figures.

I’d expect and I want out2.html to only contain the second figure.

What’s going on here? thanks.

## ···

#################

import numpy as np

from bokeh.plotting import *

N = 100

x1 = np.linspace(0, 4*np.pi, N)

y1 = np.sin(x1)

x2 = np.linspace(0, 10, N)

y2 = np.exp(x2)

output_file(‘out1.html’)

figure(tools=“pan,wheel_zoom,box_zoom,reset,previewsave”)

line(x1, y1, legend=“sin(x)”)

save()

output_file(‘out2.html’)

figure(tools=“pan,wheel_zoom,box_zoom,reset,previewsave”)

line(x2, y2, legend=“exp(x)”)

save()