wxmplot | wxPython plotting widgets using matplotlib | Data Visualization library
kandi X-RAY | wxmplot Summary
kandi X-RAY | wxmplot Summary
wxmplot provides advanced `wxpython`_ widgets for plotting and image display of numerical data based on `matplotlib`. while `matplotlib` provides excellent general purpose plotting functionality and supports many gui and non-gui backends it does not have a very tight integration with any particular gui toolkit. with a large number of plotting components and options, it is not easy for programmers to select plotting options for every stuation and not easy for end users to manipulate `matplotlib`_ plots. similarly, while `wxpython`_ has some plotting functionality, it has nothing as good or complete as `matplotlib`_. the wxmplot package attempts to bridge that gap. with the plotting and image display panels and frames from wxmplot, programmers are able to provide plotting widgets that make it easy for end users to customize plots and interact with their data. wxmplot provides wx.panels for basic 2d line
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Draws the panel
- Convert hexadecimal to rgb
- Convert color to RGB
- Auto layout the panel
- Save data to an image file
- Pack a window with a given sizer
- Close all files
- Plot an image
- Return an image display window
- Return the TIFF as a numpy array
- Builds the view menu
- Called when dual image has changed
- Display an image
- Return a list of the series
- Plot scatter plot
- Read TIFF tag from file
- Prints the bitmap of the page
- Save the figure
- Return a numpy array of pages
- Create the panel
- Event handler for text events
- Plot multiple traces
- Test all TIFF files in a directory
- Exports the plot data to a text file
- Initiate a GUI event loop
- Leftup event handler
wxmplot Key Features
wxmplot Examples and Code Snippets
Community Discussions
Trending Discussions on wxmplot
QUESTION
I have a time list below for plotting:
...ANSWER
Answered 2019-Apr-07 at 12:15Currently, wxmplot.PlotPanel.plot()
(and .oplot()
) supports auto-converting of xdata
into date-time values only when using plot(xdata, ydata, use_dates=True)
and only with xdata
as Unix timestamps.
That is, use_dates=True
does
QUESTION
I am trying to embed the matplotlib graph and NavigationToolbar widget in the wx.panel, but the positioning of the graph and navigation Toolbar is not happening properly inside the panel.
I have tried using wxmplot library and sizers as well but still didn't achieve what I am searching for.
Below is the code that I am using:
...ANSWER
Answered 2019-Jun-14 at 12:28I'm not entirely sure what you expect to happen.
It seems like you probably intend for the FigureCanvas to be not on the main panel (self
) but on your Graph_section
. If so, then changing
QUESTION
I use Timer for plotting and storing at same time. When i plot 2 values, no losing data from serial port(60 lines in minute, my device=1Hz). But when i try to plot more than 2 values, it corrupts the data(~40 lines in minute).
1.Should i try thread
or queue
instead of wx.Timer
?
2.Why does wx.Timer
corrupt my data? or what's the problem?
3.Should i use serial port func. inside wx.Timer
??
Where am i doing wrong and what? I need your help. Any help would be appreciated.
...ANSWER
Answered 2019-Apr-11 at 11:22I think you should not need to use Threads or Queues instead of wx.Timers. But, I also think you actually need only 1 wx.Timer
that checks for and grabs data from the serial port (or other data source). I would suggest that the handler for the wx.Timer
events (probably running at ~2Hz if you expect data at 1Hz) should do the following:
check for new data. if there is not new data, return immediately, waiting for next
wx.Timer
event.if there is new data, parse and do the calculations based on that data right away and append it to the data arrays within that event handler. Just drop all the storing and later deleting of temporary data and have you
self.x1
,self.y1
etc up-to-date when the data-event-handler ends. All thosedel XXX
in your code -- especially since one event handler deletes data created in another place - look like they could be a problem.and then update the plots. If you believe the plotting will be slow, you could use a second timer event that looks at whether the length of
self.x1
has changed and remake the plot(s). But, I believe you should not need to use a second timer, and can just update the plots in the data-event-handler.
For an example of how this might be done, see https://github.com/newville/wxmplot/blob/master/examples/stripchart.py
That uses just one wx.Timer
that fetches new data and updates the plot. Note that it uses wxmplot.PlotPanel.update_line()
which is much faster at updating an existing plot than redoing wxmplot.PlotPanel.plot()
for each new data set.
The next_data()
function in that example is a bit simpler and more deterministic than what you would need to do to read data from the serial port. But you're already doing that part and what you're doing doesn't look too hard or slow.
QUESTION
I needed a start and stop button for reading data continuously with a while loop, so I used the first example in here https://wiki.wxpython.org/LongRunningTasks. Then I wanted to change a graphic in continuous as well but I couldn't do it so to simulate that I tried to just change a TextCtrl. So I used wx.CallAfter to write on the TextCtrl, and I see that 'internaly' it changes but it doesn´t update the frame. I also tried using the Update() and Refresh() but that didn't work either. So I have no idea what to do and I've search all the places I could and don't know what to do anymore, so any help is appreciated!
...ANSWER
Answered 2018-Sep-05 at 23:21Your WorkerThread
class is derived from NewTaskWindow
so when you create WorkerThread
you also create a new invisible NewTaskWindow
In
wx.CallAfter(self.UpdateMedia1, str(i))
the self
refers to the invisible second frame and therefore its (invisible) text control is updated.
Solution
Don't inherit NewTaskWindow
in WorkerThread
and call the UpdateMedia1
of the visible frame object instead (you already gave it as parameter when creating WorkerThread
).
QUESTION
I am trying to create a graph that updates dynamically using wxmplot in Python 3.6. According to the documentation here: http://cars.uchicago.edu/software/python/wxmplot/plotpanel.html#plotpanel.plot, I should be calling the update_line function which allows for faster graph updates compared to redrawing the plot. However, this function is not working for me. Here is my code:
...ANSWER
Answered 2018-Apr-08 at 22:09The x and y data should be numpy arrays.
QUESTION
I'm trying to use wx.SplitterWindow
to split my main window into three pieces: one top window and two bottom windows (the bottom windows are left bottom and right bottom).
Here is what I have and what I am experiencing:
...ANSWER
Answered 2018-Mar-10 at 19:46I think that you trying to overwrite the items that are already loaded into the splitter window.
Try this instead:
Note: I have no idea what wxmplot
is, so I've commented it out
QUESTION
I'm trying to use wx.SplitterWindow
to split my main window into three pieces: one top window and two bottom windows (the bottom windows are left bottom and right bottom).
EDIT
Here is what I have and what I am experiencing:
...ANSWER
Answered 2018-Mar-08 at 13:26Can it be like this?
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install wxmplot
You can use wxmplot like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page