Giter Club home page Giter Club logo

Comments (7)

captcha1 avatar captcha1 commented on June 1, 2024 1

@captcha1: Can this issue be closed?

Yes. Sorry for my inattention (I've been been trying to learn pyqt / qt-designer well enough to write a GUI weather app).

from psyplot.

Chilipp avatar Chilipp commented on June 1, 2024

hey @captcha1! If you want to use other variables than the standard x- and y-coordinates, you should specify them in the decoder kws. This here should work:

p0 = ds0.psy.plot.plot2d(name = [f0],
    ylabel="{desc}", xlabel = 'time (UTC)',
    title = dt0.strftime(nomads2) + ' ; lat = %(lat)1.2f , lon = %(lon)1.2f',
    lat = 38.0, lon = 360 - 122.0, method="nearest", 
    # we do not want to use the usual x and y, so we specify it here
    decoder={"x": {"time"}, "y": {"lev"}},
    # time should be on the x-axis
    transpose=True,
)

image

from psyplot.

Chilipp avatar Chilipp commented on June 1, 2024

actually, specifying time as x for the decoder should already be enough and the transpose=True should be obsolete, but apparently it is still necessary as the shape for the data is ("time", "lev").

from psyplot.

captcha1 avatar captcha1 commented on June 1, 2024

Cool !

Some notes :

Is it possible to make the yaxis go from 1000 mb (near sea level) on the bottom and smaller values going up ? Also, a log-p scale would be nice. Similiar to how a "skew-t log-p" yaxis is drawn.

Is it possible to label the colorbar ?

If I set "lat = 37.899859", I get "KeyError: 37.899859"

from psyplot.

Chilipp avatar Chilipp commented on June 1, 2024

hey @captcha1!

Is it possible to make the yaxis go from 1000 mb (near sea level) on the bottom and smaller values going up ?

I do not have a formatoption implemented for this, but you can use the standard matplotlib invert_yaxis for this:

p0.update(ylim="minmax")
ax = p0.plotters[0].ax
ax.invert_yaxis()

Also, a log-p scale would be nice. Similiar to how a "skew-t log-p" yaxis is drawn.

also for the scaling I do not yet have a formatoption. you can control the y-ticks and make them logarithmic (see p0.docs("yticks")), but not the scaling. This, again, can however also be done via standard matplotlib:

ax.set_yscale("log")

see the matplotlib docs for some examples.

Is it possible to label the colorbar ?

sure, use the clabel formatoption

If I set "lat = 37.899859", I get "KeyError: 37.899859"

strange, for me that works well. Make sure you have method="nearest" set.

from psyplot.

Chilipp avatar Chilipp commented on June 1, 2024

btw, I recommend to use the p0.keys(grouped=True) method, as well as p0.docs and p0.summaries to get to know the available formatoptions.

from psyplot.

Chilipp avatar Chilipp commented on June 1, 2024

@captcha1: Can this issue be closed?

from psyplot.

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.