|
28 | 28 | import os |
29 | 29 |
|
30 | 30 | try: |
31 | | - import matplotlib.pyplot |
32 | | - assert matplotlib # NOQA silence pyflakes |
33 | | - hasMatplotlib = True |
| 31 | + #import matplotlib.pyplot |
| 32 | + #assert matplotlib # NOQA silence pyflakes |
| 33 | + #hasMatplotlib = True |
| 34 | + import plotly |
| 35 | + hasPlotly = True |
34 | 36 | except: |
35 | | - hasMatplotlib = False |
| 37 | + #hasMatplotlib = False |
| 38 | + hasPlotly = False |
36 | 39 |
|
37 | 40 | from qgis.PyQt.QtGui import QIcon |
38 | 41 |
|
@@ -259,19 +262,28 @@ def __init__(self): |
259 | 262 | FixGeometry(), ExecuteSQL(), FindProjection() |
260 | 263 | ] |
261 | 264 |
|
262 | | - if hasMatplotlib: |
263 | | - from .VectorLayerHistogram import VectorLayerHistogram |
264 | | - from .RasterLayerHistogram import RasterLayerHistogram |
265 | | - from .VectorLayerScatterplot import VectorLayerScatterplot |
266 | | - from .MeanAndStdDevPlot import MeanAndStdDevPlot |
| 265 | + #~ if hasMatplotlib: |
| 266 | + #~ from .VectorLayerHistogram import VectorLayerHistogram |
| 267 | + #~ from .RasterLayerHistogram import RasterLayerHistogram |
| 268 | + #~ from .VectorLayerScatterplot import VectorLayerScatterplot |
| 269 | + #~ from .MeanAndStdDevPlot import MeanAndStdDevPlot |
| 270 | + #~ from .BarPlot import BarPlot |
| 271 | + #~ from .PolarPlot import PolarPlot |
| 272 | + |
| 273 | + #~ self.alglist.extend([ |
| 274 | + #~ VectorLayerHistogram(), RasterLayerHistogram(), |
| 275 | + #~ VectorLayerScatterplot(), MeanAndStdDevPlot(), BarPlot(), |
| 276 | + #~ PolarPlot(), |
| 277 | + #~ ]) |
| 278 | + if hasPlotly: |
| 279 | + #~ from .VectorLayerHistogram import VectorLayerHistogram |
| 280 | + #~ from .RasterLayerHistogram import RasterLayerHistogram |
| 281 | + #~ from .VectorLayerScatterplot import VectorLayerScatterplot |
| 282 | + #~ from .MeanAndStdDevPlot import MeanAndStdDevPlot |
267 | 283 | from .BarPlot import BarPlot |
268 | | - from .PolarPlot import PolarPlot |
| 284 | + #~ from .PolarPlot import PolarPlot |
269 | 285 |
|
270 | | - self.alglist.extend([ |
271 | | - VectorLayerHistogram(), RasterLayerHistogram(), |
272 | | - VectorLayerScatterplot(), MeanAndStdDevPlot(), BarPlot(), |
273 | | - PolarPlot(), |
274 | | - ]) |
| 286 | + self.alglist.extend([BarPlot()]) |
275 | 287 |
|
276 | 288 | self.externalAlgs = [] # to store algs added by 3rd party plugins as scripts |
277 | 289 |
|
|
0 commit comments