I continue to work on the Statist plugin. It’s been a while since I updated the public repository — I’ve been working with my local copy. But today I uploaded a pretty big update.
Among the most notable changes:
ability to export frequency distribution histogram in PNG, PS, EPS, SVG and PDF formats
added toolbar with interactive plot navigation tools such as zoom and pan
the frequency distribution can be displayed as a histogram or a line graph.
ability to manually set range for both axes
improved and more polished UI
extended number of statistical values calculated by the plugin
fixed the issue with the broken plot resizing when changing the plugin window size.
There is only one major bug left (there are probably others, but they have not shown up yet) — in some cases, the histogram is displayed in a rather strange, I would say suboptimal, way. I have some ideas about how to fix this and will have to test them.
Enjoy the plugin. If you have any problems and/or feature requests, do not hesitate to email the author :-).
It is used to obtain statistical information on the specified field of the vector layer attribute table. Both numeric (integer, real, and date) and text (string) fields are supported. The plugin can work on the whole attribute table as well as on selected features. In addition to displaying basic statistical values, Statist also displays a frequency distribution histogram of the field values.
To use Statist, it is necessary to have matplotlib installed (it can be installed via OSGeo4W or downloaded from the project page, as it is used to display the frequency distribution histogram.
The plugin is available from my QGIS plugins repository. Comments, feature requests, and bug reports are welcome. It is best to post them in the bugtracker, but email is fine too.
If someone does not need a frequency distribution histogram and unnecessary dependencies, they can use the “Basic Statistics” tool from fTools (now included in core). After my patch, it has the same functionality as Statist except for the frequency distribution histogram.
I have been struggling with development of the Python plugin for Quantum GIS for quite some time now… I’m adding new features to a polygon layer, but after addition they are not visible on a map and not listed in the layer’s attribute table. However, if I remove the layer from the project and then add it again — all new features are there.
Here is the code I use
geom = QgsGeometry.fromPolygon([lstCoords])
ft = QgsFeature()
ft.setGeometry(geom)
ft.addAttribute(0, QVariant("atribute 1"))
self.iface.getMapCanvas().setCurrentLayer(vLayer)
vLayer.startEditing()
if vLayer.addFeature(ft, True):
vLayer.commitChanges()
self.iface.getMapCanvas().refresh()