Skip to content

Commit 3848497

Browse files
committed
update cookbook
1 parent 7ad3446 commit 3848497

612 files changed

Lines changed: 13436 additions & 7621 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/cookbook/5/.test.html

Lines changed: 184 additions & 0 deletions
Large diffs are not rendered by default.

content/cookbook/5/API.md

Lines changed: 1116 additions & 269 deletions
Large diffs are not rendered by default.
Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,44 @@
11
---
2-
Title: Annotation Customization - ScottPlot 5.0 Cookbook
2+
Title: Annotation Customization - ScottPlot 5 Cookbook
33
Description: Annotations can be extensively customized.
4-
URL: /cookbook/5.0/Annotation/AnnotationCustomize/
5-
BreadcrumbNames: ["ScottPlot 5.0 Cookbook", "Annotation", "Annotation Customization"]
6-
BreadcrumbUrls: ["/cookbook/5.0/", "/cookbook/5.0/Annotation", "/cookbook/5.0/Annotation/AnnotationCustomize"]
7-
Date: 2025-01-26
8-
Version: ScottPlot 5.0.55
9-
Version: ScottPlot 5.0.55
10-
SearchUrl: "/cookbook/5.0/search/"
4+
URL: /cookbook/5/Annotation/AnnotationCustomize/
5+
BreadcrumbNames: ["ScottPlot 5 Cookbook", "Annotation", "Annotation Customization"]
6+
BreadcrumbUrls: ["/cookbook/5/", "/cookbook/5/Annotation", "/cookbook/5/Annotation/AnnotationCustomize"]
7+
Date: 2025-10-11
8+
Version: ScottPlot 5.1.57
9+
Version: ScottPlot 5.1.57
10+
SearchUrl: "/cookbook/5/search/"
1111
ShowEditLink: false
1212
---
1313

14-
{{< recipe-sp5 sourceUrl="url" imageUrl="img" >}}uhhhh{{< /recipe-sp5 >}}
14+
15+
<div class='d-flex align-items-center mt-5'>
16+
<h1 class='me-2 text-dark my-0 border-0'>Annotation Customization</h1>
17+
</div>
18+
19+
Annotations can be extensively customized.
20+
21+
[![](/cookbook/5/images/AnnotationCustomize.png?251011113742)](/cookbook/5/images/AnnotationCustomize.png?251011113742)
22+
23+
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Annotation.cs" imageUrl="/cookbook/5/images/AnnotationCustomize.png?251011113742" >}}ScottPlot.Plot myPlot = new();
24+
25+
myPlot.Add.Signal(Generate.Sin());
26+
myPlot.Add.Signal(Generate.Cos());
27+
28+
var anno = myPlot.Add.Annotation("Customized\nAnnotation");
29+
anno.LabelFontSize = 32;
30+
anno.LabelFontName = Fonts.Serif;
31+
anno.LabelBackgroundColor = Colors.RebeccaPurple.WithAlpha(.3);
32+
anno.LabelFontColor = Colors.RebeccaPurple;
33+
anno.LabelBorderColor = Colors.Green;
34+
anno.LabelBorderWidth = 3;
35+
anno.LabelShadowColor = Colors.Transparent;
36+
anno.OffsetY = 40;
37+
anno.OffsetX = 20;
38+
39+
myPlot.SavePng("demo.png", 400, 300);
40+
{{< /recipe-sp5 >}}
41+
42+
<div class='my-5 text-center'>This recipe is one of many in the <a href='/cookbook/5/Annotation'>Annotation</a> category</div>
43+
44+
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
Title: Annotation Positions - ScottPlot 5.0 Cookbook
2+
Title: Annotation Positions - ScottPlot 5 Cookbook
33
Description: Annotations are aligned with the data area.
4-
URL: /cookbook/5.0/Annotation/AnnotationPositions/
5-
BreadcrumbNames: ["ScottPlot 5.0 Cookbook", "Annotation", "Annotation Positions"]
6-
BreadcrumbUrls: ["/cookbook/5.0/", "/cookbook/5.0/Annotation", "/cookbook/5.0/Annotation/AnnotationPositions"]
7-
Date: 2025-01-26
8-
Version: ScottPlot 5.0.55
9-
Version: ScottPlot 5.0.55
10-
SearchUrl: "/cookbook/5.0/search/"
4+
URL: /cookbook/5/Annotation/AnnotationPositions/
5+
BreadcrumbNames: ["ScottPlot 5 Cookbook", "Annotation", "Annotation Positions"]
6+
BreadcrumbUrls: ["/cookbook/5/", "/cookbook/5/Annotation", "/cookbook/5/Annotation/AnnotationPositions"]
7+
Date: 2025-10-11
8+
Version: ScottPlot 5.1.57
9+
Version: ScottPlot 5.1.57
10+
SearchUrl: "/cookbook/5/search/"
1111
ShowEditLink: false
1212
---
1313

@@ -18,9 +18,9 @@ ShowEditLink: false
1818

1919
Annotations are aligned with the data area.
2020

21-
[![](/cookbook/5.0/images/AnnotationPositions.png?250126165944)](/cookbook/5.0/images/AnnotationPositions.png?250126165944)
21+
[![](/cookbook/5/images/AnnotationPositions.png?251011113742)](/cookbook/5/images/AnnotationPositions.png?251011113742)
2222

23-
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Annotation.cs" imageUrl="/cookbook/5.0/images/AnnotationPositions.png?250126165944" >}}ScottPlot.Plot myPlot = new();
23+
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Annotation.cs" imageUrl="/cookbook/5/images/AnnotationPositions.png?251011113742" >}}ScottPlot.Plot myPlot = new();
2424

2525
foreach (Alignment alignment in Enum.GetValues(typeof(Alignment)))
2626
{
@@ -30,6 +30,6 @@ foreach (Alignment alignment in Enum.GetValues(typeof(Alignment)))
3030
myPlot.SavePng("demo.png", 400, 300);
3131
{{< /recipe-sp5 >}}
3232

33-
<div class='my-5 text-center'>This recipe is one of many in the <a href='/cookbook/5.0/Annotation'>Annotation</a> category</div>
33+
<div class='my-5 text-center'>This recipe is one of many in the <a href='/cookbook/5/Annotation'>Annotation</a> category</div>
3434

3535

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
Title: Annotation Quickstart - ScottPlot 5.0 Cookbook
2+
Title: Annotation Quickstart - ScottPlot 5 Cookbook
33
Description: Annotations are labels you can place on the data area of a plot. Unlike Text added to the plot (which is placed in coordinate units on the axes), Annotations are positioned relative to the data area (in pixel units) and do not move as the plot is panned and zoomed.
4-
URL: /cookbook/5.0/Annotation/AnnotationQuickstart/
5-
BreadcrumbNames: ["ScottPlot 5.0 Cookbook", "Annotation", "Annotation Quickstart"]
6-
BreadcrumbUrls: ["/cookbook/5.0/", "/cookbook/5.0/Annotation", "/cookbook/5.0/Annotation/AnnotationQuickstart"]
7-
Date: 2025-01-26
8-
Version: ScottPlot 5.0.55
9-
Version: ScottPlot 5.0.55
10-
SearchUrl: "/cookbook/5.0/search/"
4+
URL: /cookbook/5/Annotation/AnnotationQuickstart/
5+
BreadcrumbNames: ["ScottPlot 5 Cookbook", "Annotation", "Annotation Quickstart"]
6+
BreadcrumbUrls: ["/cookbook/5/", "/cookbook/5/Annotation", "/cookbook/5/Annotation/AnnotationQuickstart"]
7+
Date: 2025-10-11
8+
Version: ScottPlot 5.1.57
9+
Version: ScottPlot 5.1.57
10+
SearchUrl: "/cookbook/5/search/"
1111
ShowEditLink: false
1212
---
1313

@@ -18,9 +18,9 @@ ShowEditLink: false
1818

1919
Annotations are labels you can place on the data area of a plot. Unlike Text added to the plot (which is placed in coordinate units on the axes), Annotations are positioned relative to the data area (in pixel units) and do not move as the plot is panned and zoomed.
2020

21-
[![](/cookbook/5.0/images/AnnotationQuickstart.png?250126165944)](/cookbook/5.0/images/AnnotationQuickstart.png?250126165944)
21+
[![](/cookbook/5/images/AnnotationQuickstart.png?251011113742)](/cookbook/5/images/AnnotationQuickstart.png?251011113742)
2222

23-
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Annotation.cs" imageUrl="/cookbook/5.0/images/AnnotationQuickstart.png?250126165944" >}}ScottPlot.Plot myPlot = new();
23+
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Annotation.cs" imageUrl="/cookbook/5/images/AnnotationQuickstart.png?251011113742" >}}ScottPlot.Plot myPlot = new();
2424

2525
myPlot.Add.Signal(Generate.Sin());
2626
myPlot.Add.Signal(Generate.Cos());
@@ -30,6 +30,6 @@ myPlot.Add.Annotation("This is an Annotation");
3030
myPlot.SavePng("demo.png", 400, 300);
3131
{{< /recipe-sp5 >}}
3232

33-
<div class='my-5 text-center'>This recipe is one of many in the <a href='/cookbook/5.0/Annotation'>Annotation</a> category</div>
33+
<div class='my-5 text-center'>This recipe is one of many in the <a href='/cookbook/5/Annotation'>Annotation</a> category</div>
3434

3535

content/cookbook/5/Annotation.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
Title: Annotation - ScottPlot 5.0 Cookbook
2+
Title: Annotation - ScottPlot 5 Cookbook
33
Description: Annotations are always-visible text labels positioned over the data area.
4-
URL: /cookbook/5.0/Annotation/
5-
BreadcrumbNames: ["ScottPlot 5.0 Cookbook", "Annotation"]
6-
BreadcrumbUrls: ["/cookbook/5.0/", "/cookbook/5.0/Annotation"]
7-
Date: 2025-01-26
8-
Version: ScottPlot 5.0.55
9-
Version: ScottPlot 5.0.55
10-
SearchUrl: "/cookbook/5.0/search/"
4+
URL: /cookbook/5/Annotation/
5+
BreadcrumbNames: ["ScottPlot 5 Cookbook", "Annotation"]
6+
BreadcrumbUrls: ["/cookbook/5/", "/cookbook/5/Annotation"]
7+
Date: 2025-10-11
8+
Version: ScottPlot 5.1.57
9+
Version: ScottPlot 5.1.57
10+
SearchUrl: "/cookbook/5/search/"
1111
ShowEditLink: false
1212
---
1313

@@ -16,16 +16,16 @@ ShowEditLink: false
1616

1717
<div class='d-flex align-items-center mt-5'>
1818
<h1 class='me-2 text-dark my-0 border-0'>Annotation Quickstart</h1>
19-
<a href='/cookbook/5.0/Annotation/AnnotationQuickstart' target='_blank'>
19+
<a href='/cookbook/5/Annotation/AnnotationQuickstart' target='_blank'>
2020
<img src='/images/icons/new-window.svg' style='height: 2rem;' class='new-window-icon'>
2121
</a>
2222
</div>
2323

2424
Annotations are labels you can place on the data area of a plot. Unlike Text added to the plot (which is placed in coordinate units on the axes), Annotations are positioned relative to the data area (in pixel units) and do not move as the plot is panned and zoomed.
2525

26-
[![](/cookbook/5.0/images/AnnotationQuickstart.png?250126165944)](/cookbook/5.0/images/AnnotationQuickstart.png?250126165944)
26+
[![](/cookbook/5/images/AnnotationQuickstart.png?251011113742)](/cookbook/5/images/AnnotationQuickstart.png?251011113742)
2727

28-
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Annotation.cs" imageUrl="/cookbook/5.0/images/AnnotationQuickstart.png?250126165944" >}}ScottPlot.Plot myPlot = new();
28+
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Annotation.cs" imageUrl="/cookbook/5/images/AnnotationQuickstart.png?251011113742" >}}ScottPlot.Plot myPlot = new();
2929

3030
myPlot.Add.Signal(Generate.Sin());
3131
myPlot.Add.Signal(Generate.Cos());
@@ -41,16 +41,16 @@ myPlot.SavePng("demo.png", 400, 300);
4141

4242
<div class='d-flex align-items-center mt-5'>
4343
<h1 class='me-2 text-dark my-0 border-0'>Annotation Customization</h1>
44-
<a href='/cookbook/5.0/Annotation/AnnotationCustomize' target='_blank'>
44+
<a href='/cookbook/5/Annotation/AnnotationCustomize' target='_blank'>
4545
<img src='/images/icons/new-window.svg' style='height: 2rem;' class='new-window-icon'>
4646
</a>
4747
</div>
4848

4949
Annotations can be extensively customized.
5050

51-
[![](/cookbook/5.0/images/AnnotationCustomize.png?250126165944)](/cookbook/5.0/images/AnnotationCustomize.png?250126165944)
51+
[![](/cookbook/5/images/AnnotationCustomize.png?251011113742)](/cookbook/5/images/AnnotationCustomize.png?251011113742)
5252

53-
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Annotation.cs" imageUrl="/cookbook/5.0/images/AnnotationCustomize.png?250126165944" >}}ScottPlot.Plot myPlot = new();
53+
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Annotation.cs" imageUrl="/cookbook/5/images/AnnotationCustomize.png?251011113742" >}}ScottPlot.Plot myPlot = new();
5454

5555
myPlot.Add.Signal(Generate.Sin());
5656
myPlot.Add.Signal(Generate.Cos());
@@ -75,16 +75,16 @@ myPlot.SavePng("demo.png", 400, 300);
7575

7676
<div class='d-flex align-items-center mt-5'>
7777
<h1 class='me-2 text-dark my-0 border-0'>Annotation Positions</h1>
78-
<a href='/cookbook/5.0/Annotation/AnnotationPositions' target='_blank'>
78+
<a href='/cookbook/5/Annotation/AnnotationPositions' target='_blank'>
7979
<img src='/images/icons/new-window.svg' style='height: 2rem;' class='new-window-icon'>
8080
</a>
8181
</div>
8282

8383
Annotations are aligned with the data area.
8484

85-
[![](/cookbook/5.0/images/AnnotationPositions.png?250126165944)](/cookbook/5.0/images/AnnotationPositions.png?250126165944)
85+
[![](/cookbook/5/images/AnnotationPositions.png?251011113742)](/cookbook/5/images/AnnotationPositions.png?251011113742)
8686

87-
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Annotation.cs" imageUrl="/cookbook/5.0/images/AnnotationPositions.png?250126165944" >}}ScottPlot.Plot myPlot = new();
87+
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Annotation.cs" imageUrl="/cookbook/5/images/AnnotationPositions.png?251011113742" >}}ScottPlot.Plot myPlot = new();
8888

8989
foreach (Alignment alignment in Enum.GetValues(typeof(Alignment)))
9090
{

content/cookbook/5/ArrowCoordinated.ArrowQuickstart.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
Title: Arrow Quickstart - ScottPlot 5.0 Cookbook
2+
Title: Arrow Quickstart - ScottPlot 5 Cookbook
33
Description: Arrows can be placed on plots to point to a location in coordinate space and extensively customized.
4-
URL: /cookbook/5.0/ArrowCoordinated/ArrowQuickstart/
5-
BreadcrumbNames: ["ScottPlot 5.0 Cookbook", "Arrow", "Arrow Quickstart"]
6-
BreadcrumbUrls: ["/cookbook/5.0/", "/cookbook/5.0/ArrowCoordinated", "/cookbook/5.0/ArrowCoordinated/ArrowQuickstart"]
7-
Date: 2025-01-26
8-
Version: ScottPlot 5.0.55
9-
Version: ScottPlot 5.0.55
10-
SearchUrl: "/cookbook/5.0/search/"
4+
URL: /cookbook/5/ArrowCoordinated/ArrowQuickstart/
5+
BreadcrumbNames: ["ScottPlot 5 Cookbook", "Arrow", "Arrow Quickstart"]
6+
BreadcrumbUrls: ["/cookbook/5/", "/cookbook/5/ArrowCoordinated", "/cookbook/5/ArrowCoordinated/ArrowQuickstart"]
7+
Date: 2025-10-11
8+
Version: ScottPlot 5.1.57
9+
Version: ScottPlot 5.1.57
10+
SearchUrl: "/cookbook/5/search/"
1111
ShowEditLink: false
1212
---
1313

@@ -18,9 +18,9 @@ ShowEditLink: false
1818

1919
Arrows can be placed on plots to point to a location in coordinate space and extensively customized.
2020

21-
[![](/cookbook/5.0/images/ArrowQuickstart.png?250126165944)](/cookbook/5.0/images/ArrowQuickstart.png?250126165944)
21+
[![](/cookbook/5/images/ArrowQuickstart.png?251011113742)](/cookbook/5/images/ArrowQuickstart.png?251011113742)
2222

23-
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Arrow.cs" imageUrl="/cookbook/5.0/images/ArrowQuickstart.png?250126165944" >}}ScottPlot.Plot myPlot = new();
23+
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Arrow.cs" imageUrl="/cookbook/5/images/ArrowQuickstart.png?251011113742" >}}ScottPlot.Plot myPlot = new();
2424

2525
// create a line
2626
Coordinates arrowTip = new(0, 0);
@@ -64,6 +64,6 @@ myPlot.Axes.SetLimits(-1, 6, -1, 2);
6464
myPlot.SavePng("demo.png", 400, 300);
6565
{{< /recipe-sp5 >}}
6666

67-
<div class='my-5 text-center'>This recipe is one of many in the <a href='/cookbook/5.0/ArrowCoordinated'>Arrow</a> category</div>
67+
<div class='my-5 text-center'>This recipe is one of many in the <a href='/cookbook/5/ArrowCoordinated'>Arrow</a> category</div>
6868

6969

content/cookbook/5/ArrowCoordinated.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
Title: Arrow - ScottPlot 5.0 Cookbook
2+
Title: Arrow - ScottPlot 5 Cookbook
33
Description: Arrows point to a location in coordinate space.
4-
URL: /cookbook/5.0/ArrowCoordinated/
5-
BreadcrumbNames: ["ScottPlot 5.0 Cookbook", "Arrow"]
6-
BreadcrumbUrls: ["/cookbook/5.0/", "/cookbook/5.0/ArrowCoordinated"]
7-
Date: 2025-01-26
8-
Version: ScottPlot 5.0.55
9-
Version: ScottPlot 5.0.55
10-
SearchUrl: "/cookbook/5.0/search/"
4+
URL: /cookbook/5/ArrowCoordinated/
5+
BreadcrumbNames: ["ScottPlot 5 Cookbook", "Arrow"]
6+
BreadcrumbUrls: ["/cookbook/5/", "/cookbook/5/ArrowCoordinated"]
7+
Date: 2025-10-11
8+
Version: ScottPlot 5.1.57
9+
Version: ScottPlot 5.1.57
10+
SearchUrl: "/cookbook/5/search/"
1111
ShowEditLink: false
1212
---
1313

@@ -16,16 +16,16 @@ ShowEditLink: false
1616

1717
<div class='d-flex align-items-center mt-5'>
1818
<h1 class='me-2 text-dark my-0 border-0'>Arrow Quickstart</h1>
19-
<a href='/cookbook/5.0/ArrowCoordinated/ArrowQuickstart' target='_blank'>
19+
<a href='/cookbook/5/ArrowCoordinated/ArrowQuickstart' target='_blank'>
2020
<img src='/images/icons/new-window.svg' style='height: 2rem;' class='new-window-icon'>
2121
</a>
2222
</div>
2323

2424
Arrows can be placed on plots to point to a location in coordinate space and extensively customized.
2525

26-
[![](/cookbook/5.0/images/ArrowQuickstart.png?250126165944)](/cookbook/5.0/images/ArrowQuickstart.png?250126165944)
26+
[![](/cookbook/5/images/ArrowQuickstart.png?251011113742)](/cookbook/5/images/ArrowQuickstart.png?251011113742)
2727

28-
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Arrow.cs" imageUrl="/cookbook/5.0/images/ArrowQuickstart.png?250126165944" >}}ScottPlot.Plot myPlot = new();
28+
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/PlotTypes/Arrow.cs" imageUrl="/cookbook/5/images/ArrowQuickstart.png?251011113742" >}}ScottPlot.Plot myPlot = new();
2929

3030
// create a line
3131
Coordinates arrowTip = new(0, 0);
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
Title: AutoScale Axis Limits to Fit Data - ScottPlot 5.0 Cookbook
2+
Title: AutoScale Axis Limits to Fit Data - ScottPlot 5 Cookbook
33
Description: The axis limits can be automatically adjusted to fit the data. Optional arguments allow users to define the amount of whitespace around the edges of the data.In older versions of ScottPlot this functionality was achieved by a method named AxisAuto().
4-
URL: /cookbook/5.0/AxisAndTicks/AutoScale/
5-
BreadcrumbNames: ["ScottPlot 5.0 Cookbook", "Axis and Ticks", "AutoScale Axis Limits to Fit Data"]
6-
BreadcrumbUrls: ["/cookbook/5.0/", "/cookbook/5.0/AxisAndTicks", "/cookbook/5.0/AxisAndTicks/AutoScale"]
7-
Date: 2025-01-26
8-
Version: ScottPlot 5.0.55
9-
Version: ScottPlot 5.0.55
10-
SearchUrl: "/cookbook/5.0/search/"
4+
URL: /cookbook/5/AxisAndTicks/AutoScale/
5+
BreadcrumbNames: ["ScottPlot 5 Cookbook", "Axis and Ticks", "AutoScale Axis Limits to Fit Data"]
6+
BreadcrumbUrls: ["/cookbook/5/", "/cookbook/5/AxisAndTicks", "/cookbook/5/AxisAndTicks/AutoScale"]
7+
Date: 2025-10-11
8+
Version: ScottPlot 5.1.57
9+
Version: ScottPlot 5.1.57
10+
SearchUrl: "/cookbook/5/search/"
1111
ShowEditLink: false
1212
---
1313

@@ -18,9 +18,9 @@ ShowEditLink: false
1818

1919
The axis limits can be automatically adjusted to fit the data. Optional arguments allow users to define the amount of whitespace around the edges of the data.In older versions of ScottPlot this functionality was achieved by a method named AxisAuto().
2020

21-
[![](/cookbook/5.0/images/AutoScale.png?250126165944)](/cookbook/5.0/images/AutoScale.png?250126165944)
21+
[![](/cookbook/5/images/AutoScale.png?251011113742)](/cookbook/5/images/AutoScale.png?251011113742)
2222

23-
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/General/AxisRecipes.cs" imageUrl="/cookbook/5.0/images/AutoScale.png?250126165944" >}}ScottPlot.Plot myPlot = new();
23+
{{< recipe-sp5 sourceUrl="https://github.com/ScottPlot/ScottPlot/blob/main/src/ScottPlot5/ScottPlot5%20Cookbook/Recipes/General/AxisRecipes.cs" imageUrl="/cookbook/5/images/AutoScale.png?251011113742" >}}ScottPlot.Plot myPlot = new();
2424

2525
myPlot.Add.Signal(Generate.Sin(51));
2626
myPlot.Add.Signal(Generate.Cos(51));
@@ -34,6 +34,6 @@ myPlot.Axes.AutoScale();
3434
myPlot.SavePng("demo.png", 400, 300);
3535
{{< /recipe-sp5 >}}
3636

37-
<div class='my-5 text-center'>This recipe is one of many in the <a href='/cookbook/5.0/AxisAndTicks'>Axis and Ticks</a> category</div>
37+
<div class='my-5 text-center'>This recipe is one of many in the <a href='/cookbook/5/AxisAndTicks'>Axis and Ticks</a> category</div>
3838

3939

0 commit comments

Comments
 (0)