Вы можете построить свои данные и изменить пределы оси графика позже:
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
# generate some random date
x = np.random.normal(loc=650, scale=100, size=1000)
y = np.random.normal(loc=600, scale=200, size=1000)
plot = sns.jointplot(x, y, kind="kde")
plot.ax_marg_x.set_xlim(0, 3000)
plot.ax_marg_y.set_ylim(0, 1200)
plt.show()
You need to create a TBODY element to add your new TR to and then add the TBODY to your table, like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title></title></head><body>
<table id="employeetable">
<tr>
<th>Name</th>
<th>Job</th>
</tr>
</table>
<script type="text/javascript">
function addEmployee(employeeName, employeeJob) {
var tableElement = document.getElementById("employeetable");
if (tableElement) {
var newTable = document.createElement('tbody'); // New
var newRow = document.createElement("tr");
var nameCell = document.createElement("td");
var jobCell = document.createElement("td");
nameCell.appendChild(document.createTextNode(employeeName));
jobCell.appendChild(document.createTextNode(employeeJob));
newRow.appendChild(nameCell);
newRow.appendChild(jobCell);
newTable.appendChild(newRow); // New
tableElement.appendChild(newTable); // New
alert("code executed!");
}
}
setTimeout("addEmployee(\"Bob Smith\", \"CEO\");", 1000);
setTimeout("addEmployee(\"John Franks\", \"Vice President\");", 2000);
setTimeout("addEmployee(\"Jane Doe\", \"Director of Marketing\");", 3000);
</script>
</body></html>
По-видимому, в IE вам нужно добавить строку к элементу TBody, а не к элементу Table ... См. Обсуждение на Ruby-Forum .
Если продолжить обсуждение, разметка