Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improvements to colormap classes, "show" functions #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jan 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,21 @@ ProPlot v0.4.0 (2020-##-##)
===========================
.. rubric:: Deprecated

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

.. rubric:: Features

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

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

.. rubric:: Internals

Expand Down
6 changes: 4 additions & 2 deletions docs/1dplots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@
"axs.format(suptitle='Automatic subplot formatting')\n",
"\n",
"# Plot DataArray\n",
"cycle = plot.Cycle(plot.shade('light blue', 0.4), fade=90, space='hpl')\n",
"color = plot.shade('light blue', 0.4)\n",
"cycle = plot.Cycle(color, fade=90, space='hpl')\n",
"axs[0].plot(da, cycle=cycle, lw=3, colorbar='ul', colorbar_kw={'locator': 20})\n",
"\n",
"# Plot Dataframe\n",
"cycle = plot.Cycle(plot.shade('jade', 0.4), fade=90, space='hpl')\n",
"color = plot.shade('jade', 0.4)\n",
"cycle = plot.Cycle(color, fade=90, space='hpl')\n",
"axs[1].plot(df, cycle=cycle, lw=3, legend='uc')"
]
},
Expand Down
4 changes: 3 additions & 1 deletion docs/2dplots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@
"axs[0].format(yreverse=True)\n",
"\n",
"# Plot DataFrame\n",
"axs[1].contourf(df, cmap='Blues', colorbar='r', linewidth=0.7, color='gray7')\n",
"axs[1].contourf(\n",
" df, cmap='Blues', colorbar='r', linewidth=0.7, color='gray7'\n",
")\n",
"axs[1].format(xtickminor=False)"
]
},
Expand Down
1 change: 0 additions & 1 deletion docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dependencies:
- pip
- pip:
- ..
- lxml
- pyyaml
- pyqt5
- nbsphinx
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions proplot/cycles/538.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'#008fd5', '#fc4f30', '#e5ae38', '#6d904f', '#8b8b8b', '#810f7c',
1 change: 1 addition & 0 deletions proplot/cycles/Contrast.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"#2B4162", "#FA9F42", "#E0E0E2", "#A21817", "#0B6E4F",
1 change: 1 addition & 0 deletions proplot/cycles/Cool.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"#6C464F", "#9E768F", "#9FA4C4", "#B3CDD1", "#C7F0BD",
1 change: 1 addition & 0 deletions proplot/cycles/FlatUI.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"#3498db", "#e74c3c", "#95a5a6", "#34495e", "#2ecc71", "#9b59b6",
1 change: 1 addition & 0 deletions proplot/cycles/Floral.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"#23395B", "#D81E5B", "#FFFD98", "#B9E3C6", "#59C9A5",
1 change: 1 addition & 0 deletions proplot/cycles/Hot.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"#0D3B66", "#F95738", "#F4D35E", "#FAF0CA", "#EE964B",
1 change: 1 addition & 0 deletions proplot/cycles/Sharp.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"#007EA7", "#D81159", "#B3CDD1", "#FFBC42", "#0496FF",
1 change: 1 addition & 0 deletions proplot/cycles/Warm.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'#335c67', '#9e2a2b', '#fff3b0', '#e09f3e', '#540b0e'
1 change: 1 addition & 0 deletions proplot/cycles/colorblind.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'#0072B2', '#D55E00', '#009E73', '#CC79A7', '#F0E442', '#56B4E9',
1 change: 1 addition & 0 deletions proplot/cycles/colorblind10.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"#0173B2", "#DE8F05", "#029E73", "#D55E00", "#CC78BC", "#CA9161", "#FBAFE4", "#949494", "#ECE133", "#56B4E9"
1 change: 1 addition & 0 deletions proplot/cycles/default.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf',
1 change: 1 addition & 0 deletions proplot/cycles/ggplot.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
'#E24A33', '#348ABD', '#988ED5', '#777777', '#FBC15E', '#8EBA42', '#FFB5B8',
Loading