question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SP4: Poor automatic layout behavior for empty tick labels

See original GitHub issue

ScottPlot Version: 4.1.63

Operating System: Windows 11

Application Type: WPF

Question: As the title says. My current approach is to use TickLabelFormat, making it returns an empty string when it’s a decimal:

<WpfPlot x:Name="plotControl" />
plotControl.Plot.BottomAxis.MinimumTickSpacing(0.5);
plotControl.Plot.BottomAxis.TickLabelFormat((d) => d % 1 == 0 ? d.ToString() : string.Empty);

However this approach causes inconsistency on layout when zooming with mouse wheel:

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
swhardencommented, May 17, 2023

hide labels for decimal ticks

Oops, I realize now I misunderstood the question 😅

My “solution” hides all tick labels, and I missed your custom tick formatter 🤦 reopening 😅

0reactions
swhardencommented, May 18, 2023

Therefore, the first solution you’ve come up with (hiding labels by tick type) isn’t feasible

Hopefully #2634 solved it. I’ll publish a new package on NuGet tonight and you can let me know if it doesn’t perform as expected.

mimic a ruler

In case you hadn’t seen it, https://scottplot.net/cookbook/4.1/category/advanced-axis-features/#ruler-mode

Thanks again for this issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to hide ticks label in python but keep the ticks in place?
Set the tick labels not to be an empty array, but to be a list of empty ... This answer creates ticks without...
Read more >
SLES 15 SP4 | AutoYaST Guide
When the map is empty, it needs to be marked as a map so it does not get ... For example, when you...
Read more >
FreeStyle 1.4 – User Guide (Revision A)
Automatically saves the current layout of the active Workspace to the ... that you can see the plot details at low x-axis values....
Read more >
FactoryTalk Alarms and Events System Configuration Guide
An analog alarm defines a condition that evaluates a single analog tag against up to four limit values (high-high to low-low) and up...
Read more >
Faint Print - 5 Things That Could Cause Your Printer Problem
The 5 most common causes of light or faded prints: 1. Low ink and toner levels. As mentioned above, your cartridges could simply...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found