Skip to content

Commit c77fc25

Browse files
committed
Set default width to 5cm
1 parent 21f5034 commit c77fc25

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/maxplotlib/canvas/canvas.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def __init__(
164164
label: str | None = None,
165165
fontsize: int = 14,
166166
dpi: int = 300,
167-
width: str = "17cm",
167+
width: str = "5cm",
168168
ratio: str = "golden", # TODO Add literal
169169
gridspec_kw: Dict = {"wspace": 0.08, "hspace": 0.1},
170170
):
@@ -243,7 +243,6 @@ def add_line(
243243
subplot: LinePlot | None = None,
244244
row: int | None = None,
245245
col: int | None = None,
246-
plot_type="plot",
247246
**kwargs,
248247
):
249248
if row is not None and col is not None:
@@ -263,7 +262,6 @@ def add_line(
263262
x_data=x_data,
264263
y_data=y_data,
265264
layer=layer,
266-
plot_type=plot_type,
267265
**kwargs,
268266
)
269267

tutorials/tutorial_01.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"metadata": {},
3030
"outputs": [],
3131
"source": [
32-
"c = Canvas(width=\"17mm\", ratio=0.5, fontsize=12)\n",
32+
"c = Canvas(ratio=0.5, fontsize=12)\n",
3333
"c.add_line([0, 1, 2, 3], [0, 1, 4, 9], label=\"Line 1\")\n",
3434
"c.add_line([0, 1, 2, 3], [0, 2, 3, 4], linestyle=\"dashed\", color=\"red\", label=\"Line 2\")\n",
3535
"c.show()"
@@ -44,7 +44,7 @@
4444
"source": [
4545
"# You can also explicitly create a subplot and add lines to it\n",
4646
"\n",
47-
"c = Canvas(width=\"17cm\", ratio=0.5, fontsize=12)\n",
47+
"c = Canvas(ratio=0.5, fontsize=12)\n",
4848
"sp = c.add_subplot(\n",
4949
" grid=True, xlabel=\"(x - 10) * 0.1\", ylabel=\"10y\", yscale=10, xshift=-10, xscale=0.1\n",
5050
")\n",
@@ -63,7 +63,7 @@
6363
"source": [
6464
"# Example with multiple subplots\n",
6565
"\n",
66-
"c = Canvas(width=\"17cm\", ncols=2, nrows=2, ratio=0.5)\n",
66+
"c = Canvas(width=\"10cm\", ncols=2, nrows=2, ratio=0.5)\n",
6767
"sp = c.add_subplot(grid=True)\n",
6868
"c.add_subplot(row=1)\n",
6969
"sp2 = c.add_subplot(row=1, legend=False)\n",
@@ -82,7 +82,7 @@
8282
"outputs": [],
8383
"source": [
8484
"# Test with plotly backend\n",
85-
"c = Canvas(width=\"17cm\", ratio=0.5)\n",
85+
"c = Canvas(ratio=0.5)\n",
8686
"sp = c.add_subplot(\n",
8787
" grid=True, xlabel=\"x (mm)\", ylabel=\"10y\", yscale=10, xshift=-10, xscale=0.1\n",
8888
")\n",

tutorials/tutorial_02.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"metadata": {},
6262
"outputs": [],
6363
"source": [
64-
"c = Canvas(ncols=2, width=\"20cm\", ratio=0.5)\n",
64+
"c = Canvas(width=\"10cm\", ncols=2, ratio=0.5)\n",
6565
"tikz = c.add_tikzfigure(grid=False)\n",
6666
"\n",
6767
"# Add nodes\n",

0 commit comments

Comments
 (0)