Bokeh: Time series selection - python

Say I have data plotted for the last 50 years, but then I want to select last month, last year, last 10yrs, etc. I can do this approximately by using a box zoom tool, but is there a way for easier time series selection beyond box zoom?
For example, a slider bar (like google finance) or a radio button group (to select '1M', '1Y') but I want them to be standalone, not served. They are just an improved easy-to-use version of box zoom.

If you do not want to use the bokeh server, you have to do it on the client side. This can be done by adding custom tools or widgets in coffeescript (which compiles into javascript)
This example shows you the direction to go. I made another custom tool for bokeh and from that experience I would recommend you work on the coffeescript side (instead of writing it directly in javascript) since the javascript part of bokeh is still changing quite a bit between releases, the coffee script way might abstract a bit the detail dependencies of the library.

Related

Bokeh Gmap hide/unhide background

I have a Bokeh image made with patches onto a google map as background.
http://giove.units.it:5000
Is there a tool (or javascript code) to hide/unhide the background ? and is there way to save in png the background too ?
thanks
As of Bokeh 0.11.1 (and soon to be 0.12) there is no mechanism to hide the map portion. It seems like a reasonable feature though, an probably not terribly difficult to implement. I encourage you to submit a feature request on the project's GitHub issue tracker.
There might be some roundabout ways to do what you want currently, by setting map_options from a JS callback or something. But figuring that out would take discussion and experimentation and iteration, and StackOverflow is not very good for that kind of thing. I encourage you to bring the question to the project's public mailing list where more of a back-and-forth dialogue is possible.

Modifying Windows Frame in Python (The professional way?)

I have been using pyqt and qt designer to make a program. I wanted to custom style the top bar which holds the icon and minimize,resize,close buttons. To do this I started with using the Qt.FramelessWindowHint and making custom buttons and such. This has led to many problems with grabbing corners to resize and also snapping (all the built in windows functions). I was trying to sort through this but found many people talking about the problems that I am having. I was trying to go for the google chrome/maya/photoshop look where the top part is completely customized. A friend pointed out that if any of these programs crash, you can notice the windows bar will show through, which means they are not actually removing it but styling above it or something of that sort. How can I go about doing this so all the functionality is still there but it is styled.

Python GUI custom buttons

I am looking to make a GUI in python but currently do not have much experience. The GUI must have a few key features, namely a slider bar to control audio, and a few basic menu buttons. I realize essentially all GUI development tools could handle these simple features, but I am also interested in some custom content as well. The basic look of the GUI I am looking to create is shown here:
In the image, the slider volume bar, "button1," "button2," the colored circles, and any slice of the circle (one highlighted section is shown) needs to be clickable and interactive. Moreover, the small colored circles must be able to dynamically revolve around the edge of the circle and remain clickable at all times. I have not used any GUI development tools yet, but have looked into pyGTK, pyQT, wxWidgets, and Kivy. Can anyone who has used these tools recommend which would be best suited? As far as shapes of buttons, am I restricted?
You can use pyopengl, pygame , pygtk .
I have one example how to show this images if you want take a look at :
http://free-tutorials.org software free section is decor.tgz example.
In my opinion you can use pyOpenGL is very portable to another language like C,C++ and also you can make it to Linux , Windows , Android.

Dynamic Chart in Python

I am essentially trying to replicate the google finance chart, but for sensor data. I would like to embed the chart in a GUI and have it update on a timer (which samples the sensor for it's value). I would like to incorporate panning, resizing, and adding moving averages, much like the google finance charts, all of which is updated at some steady interval.
Much of my code base is already in python, so I would like to stick with it. Can this be done with Python?
I have checked out matplotlib, but I am not sure if it can do dynamic charts. I am using wxPython to create the GUI.
I recently came across Chaco from Enthought.
http://code.enthought.com/projects/chaco/
It is an open source framework written in Python that binds with wx, Qt etc and more usable than matplotlib for building full applications. Very usable and easily customizable. You can use the packaged panning, zooming tools or build your own.
I would suggest downloading the epd-free package to ensure you get all dependencies if you choose to move ahead with it.
http://www.enthought.com/products/epd_free.php/
I just implement a method to draw dynamic charts in ipython notebook, you can check my blog post here : http://litaotao.github.io/dynamic-charts-matplotlib-alternative-ipython-notebook-python-drawing-js
and bellow is a screenshot:

In wxPython, What is the Standard Process of Making an Application Slightly More Complex Than a Wizard?

I am attempting to create my first OS-level GUI using wxPython. I have the book wxPython in Action and have looked at the code demos. I have no experience with event-driven programming (aside from some Javascript), sizers, and all of the typical GUI elements. The book is organized a little strangely and assumes I know far more about OS GUI programming than I actually do. I'm fairly recent to object-oriented programming, as well. I'm aware that I am clearly out of my depth.
My application, on the GUI side, is simple: mostly a set of reminder screens ("Turn on the scanner," "Turn on the printer," etc) and background actions in Python either in the filesystem or from hitting a web service, but it is just complex enough that the Wizard class does not quite seem to cover it. I have to change the names on the "Back" and "Next" buttons, disable them at times, and so forth.
What is the standard process for an application such as mine?
1) Create a single wxFrame, then put all of my wxPanels inside of it, hiding all but one, then performing a sequence of hides and shows as the "Next" button (or the current equivalent) are triggered?
2) Create multiple wxFrames, with one wxPanel in each, then switch between them?
3) Some non-obvious fashion of changing the names of the buttons in wxWizard and disabling them?
4) Something I have not anticipated in the three categories above.
I don't have a good understanding of your application, but trying to force wxWizard to suit your needs sounds like a bad idea.
I suggest checking out the Demos available from the wxPython website. Go through each demo and I bet you'll find one that suits your needs.
I've personally never used wxWizard as I find it too cumbersome. Instead, I create a sequence of dialogs that do what I need.

Categories