---
title: "Logging and Plotting"
description: "In QuantConnect, the self.Debug() method is the equivalent of the log.info() function in Quantopian."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline/logging-and-plotting
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline/logging-and-plotting.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/99%20Migrations/01%20Zipline/03%20Logging%20and%20Plotting
modified: 2026-10-30
index: https://www.quantconnect.com/llms.txt
---

# Logging and Plotting

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Migrations > [Zipline](https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline.md) > Logging and Plotting

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Logging

In QuantConnect, the `self.Debug()` method is the equivalent of the `log.info()` function in Quantopian. Debug output is viewable via the QuantConnect Terminal Console.

Output to the console via `self.Debug()` is rate-limited. If you need long-term storage of your logs and don't want to overflow the console, consider using `self.Log()` instead. An example comparing logging between Quantopian and QuantConnect is shown below.

Quantopian

```python
def initialize(context):
    log.info("Hello, console!")
```

QuantConnect

```python
class MyLoggingAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.debug("Hello, console!")
        self.log("Hello, backtesting logs!")
```

Logging via `self.Log()` has daily limits in QuantConnect. On the free tier, users are limited to 10KB of logs per day for your account/organization. To increase this limit, you can upgrade your account to a different tier. Calls to `self.Debug()` will also count towards the 10KB log limit, but are always outputted to the Terminal Console regardless of your daily log limit.

To view pricing and upgrade your account, visit the [Organization Pricing](https://www.quantconnect.com/pricing) page.

You can view the logs generated via `self.Log()` for a backtest by first accessing a backtest, and clicking the "Logs" tab near the bottom of the page. To download the logs, you can click the "Download Logs" link to download a text file containing your backtest's logs.

## Plotting

In Quantopian, plotting/charting is done with the `record(series1_name=scalar_value, series2_name=scalar_value, ...)` function. In QuantConnect, plotting is accessible via the `self.plot("chart name", "series name", scalar_value)` method.

Plotting multiple series in one function call is possible in Quantopian. However, in QuantConnect, a separate call is needed for each series requiring an update. All series with the same chart name will appear on the same window/pane. New charts can be created by calling `self.plot()` method with a unique chart name.

An example of plotting in Quantopian vs. QuantConnect is shown below. The QuantConnect code will create two charts, one named "Chart1" with two series of data, and another named "Chart2" with one series of data. Note that you can also use `self.plot("series name", value)` to place the custom series on the same chart as the equity curve.

Quantopian

```python
import numpy as np
from quantopian.algorithm import record

    def initialize(context):
        context.i = 0

    def handle_data(context, data):
        context.i += 0.25

        record(
            series1=np.sin(context.i),
            Series2=np.cos(context.i),
            Series3=np.tan(context.i)
        )
```

QuantConnect

```python
import numpy as np

class Algorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.i = 0

    def on_data(self, slice: Slice) -> None:
        self.i += 0.25

        self.plot('Chart1', 'Series1', np.sin(self.i))
        self.plot('Chart1', 'Series2', np.cos(self.i))
        self.plot('Chart2', 'Chart2 Series1', np.tan(self.i))
```

For more information on plotting in QuantConnect, visit the [Charting](https://www.quantconnect.com/docs/v2/writing-algorithms/charting.md) documentation page.
