Pie chart doesn't have Axes?
See original GitHub issueBug Report
Issue: (Bug description goes here) Pie chart and legend overlaps XAxis2.
In multiplot it’s not consistent with other plots:
Depending on plot size it’s pie is covering the title:
Reproducing: (What do others have to do to reproduce the bug?)
RoslynPad:
#r "nuget:ScottPlot/4.1.33"
using System.Drawing;
using ScottPlot;
var plt = new ScottPlot.Plot(300, 300);
plt.Title("Winners Losers Total");
double[] values = { 100, 50 };
string[] labels = { "Winners", "Losers" };
var pie = plt.AddPie(values);
pie.SliceLabels = labels;
pie.SliceFillColors = new Color[] { Color.ForestGreen, Color.Crimson };
var legend = plt.Legend();
legend.Location = Alignment.UpperRight;
plt.SaveFig("pie.png");
System Details
- ScottPlot Version: 4.1.32
- Operating System: Windows10
- Application Type: console
- .NET Version: NET 6.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Change the display of chart axes
Important: This article does NOT cover changing the scale of chart axes. ... Radar charts do not have horizontal (category) axes, and pie...
Read more >Add or remove titles in a chart
Some chart types (such as radar charts) have axes, but they cannot display axis titles. You can't add axis titles to charts that...
Read more >Pie charts and using the Y and X axis - English
Pie Charts have only Y-Values which build the segments of the pie. There are NO X-values and no x-axis. AlexKemp ...
Read more >Where data appears on pie charts
Pie charts do not have a typical X-axis and Y-axis. Compare the report in Figure 1 and the pie chart in Figure 2...
Read more >How to Choose Between a Bar Chart and Pie Chart
Bar charts and pie charts are very common chart types with some overlap in use cases. In this article, you'll learn more about...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was using the default rendering
You may do well to move the legend outside the plot. You can call
formsPlot1.Plot.GetLegendBitmap()
to get the legend image then perhaps display it in your window on aPicturebox
or render it on your largerBitmap
or something.Hope it helps! Scott
To hide everything but the title label you can use the code above then manually hide the grid lines, axis border lines, and ticks. This will retain space for the title and prevent the circle from overlapping it.