# Questions about "dseries" plot method behaviour

**URL:** <https://forum.dynare.org/t/questions-about-dseries-plot-method-behaviour/27136>\
**Category:** dseries/data/reporting\
**Created:** [4 February 2025 18:41 UTC](https://forum.dynare.org/t/questions-about-dseries-plot-method-behaviour/27136 "2025-02-04T18:41:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Brasidas](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@Brasidas](https://forum.dynare.org/u/Brasidas)\
**Post date:** [4 February 2025 21:46 UTC](https://forum.dynare.org/t/questions-about-dseries-plot-method-behaviour/27136/2 "2025-02-04T21:46:59Z")

</div>

There was a previous example by Stéphane Adjemian (see [Placing dates on the horizontal axis of historical shock decomposition shocks - #4 by stepan-a](https://forum.dynare.org/t/placing-dates-on-the-horizontal-axis-of-historical-shock-decomposition-shocks/13411/4)) showing its very easy implementation.

However, for me the above example does not work in Dyanre 6. The answer can be found in the examples in

> **[Dynare Reference Manual: 6.2 dseries class](https://archives.dynare.org/manual/index_46.html)**
>
> Dynare Reference Manual: 6.2 dseries class

If you have created two dseries objects named, say, ts1 and ts2 (with the latter being in a subsample of the former)

plot(ts1(ts2.dates).data,‘-k’); % Plot of the stationary component.  
hold on  
plot(ts2.data,‘–r’); % Plot of the filtered y.  
hold off  
axis tight  
id = get(gca,‘XTick’);  
set(gca,‘XTickLabel’,strings(ts1.dates(id)));

The key for the dates being plotted lies in the last two lines.

---

_[View the full topic](https://forum.dynare.org/t/questions-about-dseries-plot-method-behaviour/27136)._
