Skip to content

Commit 22dae3d

Browse files
authored
Merge pull request #98 from lukelbd/cmap-cycle-improvements
Colormap class improvements, new static method
2 parents 2289bcc + 2b80888 commit 22dae3d

20 files changed

+489
-479
lines changed

CHANGELOG.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,21 @@ ProPlot v0.4.0 (2020-##-##)
4747
===========================
4848
.. rubric:: Deprecated
4949

50-
- Remove redundant `~proplot.rctools.use_fonts`, use ``rcParams['sans-serif']``
51-
precedence instead (:pr:`95`).
52-
- `~proplot.axes.Axes.dualx` and `~proplot.axes.Axes.dualx` no longer accept "scale-spec" arguments.
53-
Must be a function, two functions, or an axis scale instance (:pr:`96`).
5450
- Remove ``subplots.innerspace``, ``subplots.titlespace``,
5551
``subplots.xlabspace``, and ``subplots.ylabspace`` spacing arguments,
5652
automatically calculate default non-tight spacing using `~proplot.subplots._get_space`
5753
based on current tick lengths, label sizes, etc.
54+
- Remove redundant `~proplot.rctools.use_fonts`, use ``rcParams['sans-serif']``
55+
precedence instead (:pr:`95`).
56+
- `~proplot.axes.Axes.dualx` and `~proplot.axes.Axes.dualx` no longer accept "scale-spec" arguments.
57+
Must be a function, two functions, or an axis scale instance (:pr:`96`).
58+
- Rename `~proplot.styletools.Cycle` ``samples`` to ``N``, rename
59+
`~proplot.styletools.show_colors` ``nbreak`` to ``nhues`` (:pr:`98`).
5860

5961
.. rubric:: Features
6062

63+
- Add `~proplot.styletools.LinearSegmentedColormap.from_file` static methods (:pr:`98`).
64+
You can now load files by passing a name to `~proplot.styletools.Colormap`.
6165
- Add Fira Math as DejaVu Sans-alternative (:pr:`95`). Has complete set of math characters.
6266
- Add TeX Gyre Heros as Helvetica-alternative (:pr:`95`). This is the new open-source default font.
6367
- Add `xlinewidth`, `ylinewidth`, `xgridcolor`, `ygridcolor` keyword
@@ -81,7 +85,7 @@ ProPlot v0.4.0 (2020-##-##)
8185

8286
- Imperative mood for docstring summaries (:pr:`92`).
8387
- Fix `~proplot.styletools.show_cycles` bug (:pr:`90`) and show cycles using colorbars
84-
rather than lines.
88+
rather than lines (:pr:`98`).
8589

8690
.. rubric:: Internals
8791

docs/1dplots.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,13 @@
8888
"axs.format(suptitle='Automatic subplot formatting')\n",
8989
"\n",
9090
"# Plot DataArray\n",
91-
"cycle = plot.Cycle(plot.shade('light blue', 0.4), fade=90, space='hpl')\n",
91+
"color = plot.shade('light blue', 0.4)\n",
92+
"cycle = plot.Cycle(color, fade=90, space='hpl')\n",
9293
"axs[0].plot(da, cycle=cycle, lw=3, colorbar='ul', colorbar_kw={'locator': 20})\n",
9394
"\n",
9495
"# Plot Dataframe\n",
95-
"cycle = plot.Cycle(plot.shade('jade', 0.4), fade=90, space='hpl')\n",
96+
"color = plot.shade('jade', 0.4)\n",
97+
"cycle = plot.Cycle(color, fade=90, space='hpl')\n",
9698
"axs[1].plot(df, cycle=cycle, lw=3, legend='uc')"
9799
]
98100
},

docs/2dplots.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@
9595
"axs[0].format(yreverse=True)\n",
9696
"\n",
9797
"# Plot DataFrame\n",
98-
"axs[1].contourf(df, cmap='Blues', colorbar='r', linewidth=0.7, color='gray7')\n",
98+
"axs[1].contourf(\n",
99+
" df, cmap='Blues', colorbar='r', linewidth=0.7, color='gray7'\n",
100+
")\n",
99101
"axs[1].format(xtickminor=False)"
100102
]
101103
},

docs/environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ dependencies:
1818
- pip
1919
- pip:
2020
- ..
21-
- lxml
2221
- pyyaml
2322
- pyqt5
2423
- nbsphinx
File renamed without changes.

proplot/cycles/538.hex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
'#008fd5', '#fc4f30', '#e5ae38', '#6d904f', '#8b8b8b', '#810f7c',

proplot/cycles/Contrast.hex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"#2B4162", "#FA9F42", "#E0E0E2", "#A21817", "#0B6E4F",

proplot/cycles/Cool.hex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"#6C464F", "#9E768F", "#9FA4C4", "#B3CDD1", "#C7F0BD",

proplot/cycles/FlatUI.hex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"#3498db", "#e74c3c", "#95a5a6", "#34495e", "#2ecc71", "#9b59b6",

proplot/cycles/Floral.hex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"#23395B", "#D81E5B", "#FFFD98", "#B9E3C6", "#59C9A5",

0 commit comments

Comments
 (0)