Skip to content

Commit 60bae35

Browse files
committed
add dual Y axis example
1 parent fe249ac commit 60bae35

6 files changed

+138
-120
lines changed

src/notebooks/line-chart-dual-y-axis-with-matplotlib.ipynb

Lines changed: 127 additions & 119 deletions
Large diffs are not rendered by default.

src/pages/line-chart.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default function LinePlot() {
6363
<p>
6464
<code>Matplotlib</code> is a great fit to build line charts thanks to its <code>plot()</code> function. The <Link to='/120-line-chart-with-matplotlib'>first chart</Link> of
6565
this section explains how to use <code>plot()</code> from any kind of data input format. The <Link to='/121-line-chart-customization'>next one</Link> goes deep
66-
into chart customization (line width, color aspect and more).
66+
into chart customization (line width, color aspect and more). A common need is to build a <Link to="/line-chart-dual-y-axis-with-matplotlib">dual Y axis line chart</Link>, but be mindful of the <a href="https://www.data-to-viz.com/caveat/dual_axis.html">caveats</a> that go with it.
6767
</p>
6868
<Row>
6969
<ChartImageContainer
@@ -81,6 +81,11 @@ export default function LinePlot() {
8181
caption="How to deal with the date format. How to represent those dates properly on the X axis."
8282
linkTo="/basic-time-series-with-matplotlib"
8383
/>
84+
<ChartImageContainer
85+
imgName="line-chart-dual-y-axis-with-matplotlib1"
86+
caption="How to build a dual Y axis line chart to display 2 series with different units."
87+
linkTo="/line-chart-dual-y-axis-with-matplotlib"
88+
/>
8489
</Row>
8590
</Container>
8691

src/pages/timeseries.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ export default function Pie() {
115115
caption="How to deal with the date format. How to represent those dates properly on the X axis."
116116
linkTo="/basic-time-series-with-matplotlib"
117117
/>
118+
<ChartImageContainer
119+
imgName="line-chart-dual-y-axis-with-matplotlib1"
120+
caption="How to build a dual Y axis line chart to display 2 series with different units."
121+
linkTo="/line-chart-dual-y-axis-with-matplotlib"
122+
/>
118123
</Row>
119124
</Container>
120125

47.7 KB
Loading
41.9 KB
Loading
42.1 KB
Loading

0 commit comments

Comments
 (0)