diff --git a/meteoinfo-data/pom.xml b/meteoinfo-data/pom.xml
index 4f5f4f31..75264439 100644
--- a/meteoinfo-data/pom.xml
+++ b/meteoinfo-data/pom.xml
@@ -52,43 +52,46 @@
edu.ucar
cdm-core
${netcdf.version}
- compile
edu.ucar
bufr
${netcdf.version}
- compile
edu.ucar
cdm-image
${netcdf.version}
- compile
+
+
+ edu.ucar
+ cdm-misc
+ ${netcdf.version}
+
+
+ edu.ucar
+ cdm-radial
+ ${netcdf.version}
edu.ucar
grib
${netcdf.version}
- compile
edu.ucar
netcdf4
${netcdf.version}
- compile
edu.ucar
opendap
${netcdf.version}
- compile
edu.ucar
cdm-mcidas
${netcdf.version}
- compile
com.github.albfernandez
diff --git a/meteoinfo-lab/milconfig.xml b/meteoinfo-lab/milconfig.xml
index 46acaf05..6b010296 100644
--- a/meteoinfo-lab/milconfig.xml
+++ b/meteoinfo-lab/milconfig.xml
@@ -1,10 +1,8 @@
-
-
+
-
@@ -14,15 +12,21 @@
-
+
+
+
+
+
+
+
diff --git a/meteoinfo-lab/pylib/mipylib/plotlib/miplot$py.class b/meteoinfo-lab/pylib/mipylib/plotlib/miplot$py.class
index 67316c87..42a107c7 100644
Binary files a/meteoinfo-lab/pylib/mipylib/plotlib/miplot$py.class and b/meteoinfo-lab/pylib/mipylib/plotlib/miplot$py.class differ
diff --git a/meteoinfo-lab/pylib/mipylib/plotlib/miplot.py b/meteoinfo-lab/pylib/mipylib/plotlib/miplot.py
index 93bdf8ad..6d976dfc 100644
--- a/meteoinfo-lab/pylib/mipylib/plotlib/miplot.py
+++ b/meteoinfo-lab/pylib/mipylib/plotlib/miplot.py
@@ -44,7 +44,7 @@ __all__ = [
'errorbar', 'figure', 'glfigure', 'figsize', 'patch', 'rectangle', 'fill', 'fill3', 'fill_between',
'fill_betweenx', 'fimplicit3', 'webmap', 'gca', 'gcf', 'gc_collect', 'geoshow', 'get_figure',
'gifaddframe', 'gifanimation', 'giffinish', 'grid', 'gridshow', 'gridshowm', 'hist', 'imshow',
- 'imshowm', 'isosurface', 'legend', 'left_title', 'lighting', 'loglog', 'makecolors', 'makelegend',
+ 'imshowm', 'isosurface', 'legend', 'left_title', 'lighting', 'loglog', 'makecolors', 'makelegend','makemarkers',
'makesymbolspec', 'masklayer', 'material', 'mesh', 'meshc', 'model', 'particles', 'pcolor', 'pcolorm',
'pie', 'plot', 'plot3', 'plotm', 'quiver', 'quiver3', 'quiverkey', 'quiverm', 'readlegend',
'right_title', 'refresh', 'savefig', 'savefig_jpeg', 'scatter', 'scatter3', 'scatterm', 'semilogx',
@@ -2215,6 +2215,11 @@ def makecolors(n, cmap='matlab_jet', reverse=False, alpha=None, start=None, stop
return plotutil.makecolors(n, cmap, reverse, alpha, start, stop)
+@_copy_docstring_and_deprecators(plotutil.makemarkers)
+def makemarkers(n):
+ return plotutil.makemarkers(n)
+
+
@_copy_docstring_and_deprecators(plotutil.makelegend)
def makelegend(source, **kwargs):
return plotutil.makelegend(source, **kwargs)
diff --git a/meteoinfo-lab/pylib/mipylib/plotlib/plotutil$py.class b/meteoinfo-lab/pylib/mipylib/plotlib/plotutil$py.class
index df5c7d1c..703b70a9 100644
Binary files a/meteoinfo-lab/pylib/mipylib/plotlib/plotutil$py.class and b/meteoinfo-lab/pylib/mipylib/plotlib/plotutil$py.class differ
diff --git a/meteoinfo-lab/pylib/mipylib/plotlib/plotutil.py b/meteoinfo-lab/pylib/mipylib/plotlib/plotutil.py
index edbac2b2..bc703cd3 100644
--- a/meteoinfo-lab/pylib/mipylib/plotlib/plotutil.py
+++ b/meteoinfo-lab/pylib/mipylib/plotlib/plotutil.py
@@ -283,6 +283,8 @@ def makecolors(n, cmap='matlab_jet', reverse=False, alpha=None, start=None, stop
def getpointstyle(style):
if style is None:
return None
+ elif isinstance(style, PointStyle):
+ return style
pointStyle = None
if 'do' in style:
@@ -367,6 +369,24 @@ def gethatch(h):
return HatchStyle.getStyle(h)
+def makemarkers(n):
+ """
+ Make markers.
+
+ :param n: (*int*) The number of markers.
+
+ :return: (*list of markers*) The markers.
+ """
+ markers = []
+ i = 0
+ for _ in range(n):
+ if i == len(PointStyle.values()):
+ i = 0
+ markers.append(PointStyle.values()[i])
+ i += 1
+ return markers
+
+
def getmarkerplotstyle(style, caption, **kwargs):
c, style = getcolor_style(style)
if kwargs.has_key('color'):
@@ -502,13 +522,35 @@ def getlegendbreaks(lb, **kwargs):
if cmap is not None:
colors = makecolors(ncolors, cmap=cmap)
- if colors is not None:
- n = len(colors)
- colors = getcolors(colors)
- for cc in colors:
- nlb = lb.clone()
- nlb.setColor(cc)
- lbs.append(nlb)
+ if isinstance(lb, PolylineBreak):
+ if colors is not None:
+ n = len(colors)
+ colors = getcolors(colors)
+ markers = kwargs.pop('markers', None)
+ if markers is None:
+ for cc in colors:
+ nlb = lb.clone()
+ nlb.setColor(cc)
+ nlb.setSymbolColor(cc)
+ nlb.setSymbolFillColor(cc)
+ lbs.append(nlb)
+ else:
+ for cc, marker in zip(colors, markers):
+ nlb = lb.clone()
+ nlb.setColor(cc)
+ nlb.setDrawSymbol(True)
+ nlb.setSymbolStyle(getpointstyle(marker))
+ nlb.setSymbolColor(cc)
+ nlb.setSymbolFillColor(cc)
+ lbs.append(nlb)
+ else:
+ if colors is not None:
+ n = len(colors)
+ colors = getcolors(colors)
+ for cc in colors:
+ nlb = lb.clone()
+ nlb.setColor(cc)
+ lbs.append(nlb)
if len(lbs) == 0:
return lb
@@ -587,20 +629,20 @@ def getlegendbreak(geometry, **kwargs):
pstyle = getpointstyle(marker)
lb.setDrawSymbol(True)
lb.setSymbolStyle(pstyle)
- markersize = kwargs.pop('markersize', None)
- if not markersize is None:
- lb.setSymbolSize(markersize)
- markercolor = kwargs.pop('markeredgecolor', lb.getColor())
- markercolor = getcolor(markercolor)
- lb.setSymbolColor(markercolor)
- fillcolor = kwargs.pop('markerfacecolor', lb.getColor())
- if not fillcolor is None:
- lb.setFillSymbol(True)
- lb.setSymbolFillColor(getcolor(fillcolor))
- else:
- lb.setSymbolFillColor(markercolor)
- interval = kwargs.pop('markerinterval', 1)
- lb.setSymbolInterval(interval)
+ markersize = kwargs.pop('markersize', None)
+ if not markersize is None:
+ lb.setSymbolSize(markersize)
+ markercolor = kwargs.pop('markeredgecolor', lb.getColor())
+ markercolor = getcolor(markercolor)
+ lb.setSymbolColor(markercolor)
+ fillcolor = kwargs.pop('markerfacecolor', lb.getColor())
+ if not fillcolor is None:
+ lb.setFillSymbol(True)
+ lb.setSymbolFillColor(getcolor(fillcolor))
+ else:
+ lb.setSymbolFillColor(markercolor)
+ interval = kwargs.pop('markerinterval', 1)
+ lb.setSymbolInterval(interval)
elif geometry == 'polygon':
lb = PolygonBreak()
edge = True
diff --git a/meteoinfo-map/src/main/java/org/meteoinfo/map/forms/FrmMain.java b/meteoinfo-map/src/main/java/org/meteoinfo/map/forms/FrmMain.java
index e4bf52c9..41983e37 100644
--- a/meteoinfo-map/src/main/java/org/meteoinfo/map/forms/FrmMain.java
+++ b/meteoinfo-map/src/main/java/org/meteoinfo/map/forms/FrmMain.java
@@ -1954,9 +1954,9 @@ public class FrmMain extends JFrame implements IApplication {
double projX = pXY[0];
double projY = pXY[1];
if (_mapDocument.getActiveMapFrame().getMapView().getProjection().isLonLatMap()) {
- this.jLabel_Coordinate.setText("Lon: " + String.format("%1$.2f", projX) + "; Lat: " + String.format("%1$.2f", projY));
+ this.jLabel_Coordinate.setText("Lon: " + String.format("%.2f", projX) + "; Lat: " + String.format("%.2f", projY));
} else {
- this.jLabel_Coordinate.setText("X: " + String.format("%1$.1f", projX) + "; Y: " + String.format("%1$.1f", projY));
+ this.jLabel_Coordinate.setText("X: " + String.format("%.1f", projX) + "; Y: " + String.format("%.1f", projY));
String theText = this.jLabel_Coordinate.getText();
if (_mapDocument.getActiveMapFrame().getMapView().getProjection().getProjInfo().getProjectionName() == ProjectionNames.Robinson) {
return;
@@ -1968,8 +1968,8 @@ public class FrmMain extends JFrame implements IApplication {
points[0] = new double[]{projX, projY};
try {
Reproject.reprojectPoints(points, fromProj, toProj, 0, 1);
- this.jLabel_Coordinate.setText(theText + " (Lon: " + String.format("%1$.2f", points[0][0]) + "; Lat: "
- + String.format("%1$.2f", points[0][1]) + ")");
+ this.jLabel_Coordinate.setText(theText + " (Lon: " + String.format("%.2f", points[0][0]) + "; Lat: "
+ + String.format("%.2f", points[0][1]) + ")");
} catch (Exception ex) {
ex.printStackTrace();
}