Coder Social home page Coder Social logo

Comments (3)

OnnoEbbens avatar OnnoEbbens commented on July 17, 2024

In the section_plot function a line is plotted using p = ax_obs.plot(plot_df). Using this, matplotlib will pick an xlim in such a way that there is some white space before the start (and after the end) of the line. I think they do this so you can see exactly where the line starts (and ends).

When you specify tmin in the section_plot function the plof_df is sliced using plot_df = self._obj.loc[name, "obs"][tmin:tmax][cols].copy(). The plot is still created using p = ax_obs.plot(plot_df) so matplotlib will pick an xlim with some white space before the start of the sliced DataFrame.

I think the solution here is to set the xlim after the plot is created based on tmin and tmax for example: ax_obs.set_xlim(tmin, tmax).

from hydropandas.

HMEUW avatar HMEUW commented on July 17, 2024

Thanks for your suggestion. I will implement for the option when tmin is set. I will do some research about the chosen xlim for the plot without tmin. A 4,5 year gap is a little bit too much for me.

Today I checked wether there is some NaN data in the dataset, that might cause the 4,5 year gap. There is no NaN data.

from hydropandas.

martinvonk avatar martinvonk commented on July 17, 2024

closed by #116

from hydropandas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.