0

I'm wanting to format this histplot in seaborn so that it includes the date range for the entire dataset I have, not just the range in which this variable occurs. Histplot with code above, shows data ranging in the may 2025 time frame

I want it to show it only occurs in may compared to other months of my dataset, so it looks more like this one. Histplot showing data ranging from February to May, showing a peak in May

Is there a way to create this formatting even though there is no data for any of the preceding months? I already tried using binrange with a start date and an end date, but it kept giving me errors when I tried that.

I tried using a binrange function with the bounds of my dataset as the starting and ending point, but it did not respond well to the date format.

3
  • 1
    I don't know if it works in histogram and in seaborn but in normal plot in matplotlib you can use xlim to change x limit and it may show more axis Commented Jul 1 at 18:41
  • 1
    see doc: seaborn.objects.Plot.limit which is described as "Control the range of visible data." Commented Jul 1 at 18:42
  • 1
    Please provide enough code so others can better understand or reproduce the problem. Commented Jul 1 at 20:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.