Code Monkey home page Code Monkey logo

Comments (6)

AdamTheisen avatar AdamTheisen commented on May 29, 2024

@kenkehoe I was going to try some tests on this. I wonder if there is an easier way than a new method

from act.

AdamTheisen avatar AdamTheisen commented on May 29, 2024

What do you think of this as an option? It's just 2 additional lines. Getting the index and then the plot call (bolded).

index = np.where(met_temp < -2.)[0]
....
#Display data using plotting methods
new = {'sgpmetE13.b1': met, 'sgpceilC1.b1':ceil}
display = act.plotting.TimeSeriesDisplay(new,figsize=(8,5))
display.plot('met_lcl',dsname='sgpmetE13.b1',color='b')
display.day_night_background('sgpmetE13.b1')
set_title = ' '.join(['MET LCL and CEIL CBH on',
act.utils.datetime_utils.numpy_to_arm_date(met.time.values[0])])
display.plot('first_cbh',dsname='sgpceilC1.b1',color='g',set_title=set_title)
display.set_yrng([0,7500])
display.axes[0].plot(met['time'].values[index], np.full(len(index), display.axes[0].get_ylim()[0]), '|r')
display.axes[0].legend()
plt.savefig('./images/lcl.png')
plt.clf()

lcl

from act.

kenkehoe avatar kenkehoe commented on May 29, 2024

OK that is a good solution. I'll think about this.

from act.

AdamTheisen avatar AdamTheisen commented on May 29, 2024

@kenkehoe have you had a chance to think about this implementation?

from act.

kenkehoe avatar kenkehoe commented on May 29, 2024

Yeah, I've implemented something similar to your code snippet above a few times. Since this is just a few lines of extra code outside of ACT I think we can skip adding more code to ACT. We can close this.

from act.

kenkehoe avatar kenkehoe commented on May 29, 2024

Since we have a solution outside of ACT I'm going to close this.

from act.

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.