<commit_before>
import numpy as np

from PySide6 import QtCore, QtGui, QtWidgets
# FIXME
# FIXME QtCharts will probably be available in Qt for Python 6.1
# FIXME
# from PySide6.QtCharts import QtChart

import logging
logger = logging.getLogger(__name__)


class ContourAnalysis(QtWidgets.QFrame):
    """Summary

    Attributes:
        canvas (TYPE): Description
        figure (TYPE): Description
        raw_coordinates (list): contour points as tuples
        toolbar (TYPE): Description
    """
    def __init__(self, canvas=False):
        super().__init__()

        # get MainWindow instance (overcomes handling parents)
        self.mainwindow = QtCore.QCoreApplication.instance().mainwindow

        # run the gui part only when canvas set to true
        if canvas:
            # FIXME
            # FIXME QtCharts will probably be available in Qt for Python 6.1
            # FIXME
            pass
            # self.initUI()

    def initUI(self):
        self.lineSeries = QtChart.QLineSeries()
        # legend name
        # self.lineSeries.setName("trend")
        self.lineSeries.append(QtCore.QPoint(0, 0))

        pen = QtGui.QPen(QtCore.Qt.red, 6, QtCore.Qt.SolidLine)
        self.lineSeries.setPen(pen)

        self.chart = QtChart.QChart()
        self.chart.setAnimationOptions(QtChart.QChart.AllAnimations)
        self.chart.setTitle("Airfoil contour analysis")
        self.chart.addSeries(self.lineSeries)

        self.chart.legend().setVisible(False)
        self.chart.legend().setAlignment(QtCore.Qt.AlignBottom)

        self.axisX = QtChart.QValueAxis()
        self.axisY = QtChart.QValueAxis()
        self.chart.setAxisX(self.axisX, self.lineSeries)<commit_msg>fixed contour analysis (QtCharts)<commit_after>
import numpy as np

from PySide6 import QtCore, QtGui, QtWidgets
import PySide6.QtCharts as QtCharts

import logging
logger = logging.getLogger(__name__)


class ContourAnalysis(QtWidgets.QFrame):
    """Summary

    Attributes:
        canvas (TYPE): Description
        figure (TYPE): Description
        raw_coordinates (list): contour points as tuples
        toolbar (TYPE): Description
    """
    def __init__(self, canvas=False):
        super().__init__()

        # get MainWindow instance (overcomes handling parents)
        self.mainwindow = QtCore.QCoreApplication.instance().mainwindow

        # run the gui part only when canvas set to true
        if canvas:
            self.initUI()

    def initUI(self):
        self.lineSeries = QtCharts.QLineSeries()
        # legend name
        # self.lineSeries.setName("trend")
        self.lineSeries.append(QtCore.QPoint(0, 0))

        pen = QtGui.QPen(QtCore.Qt.red, 6, QtCore.Qt.SolidLine)
        self.lineSeries.setPen(pen)

        self.chart = QtCharts.QChart()
        self.chart.setAnimationOptions(QtCharts.QChart.AllAnimations)
        self.chart.setTitle("Airfoil contour analysis")
        self.chart.addSeries(self.lineSeries)

        self.chart.legend().setVisible(False)
        self.chart.legend().setAlignment(QtCore.Qt.AlignBottom)

        self.axisX = QtCharts.QValueAxis()
        self.axisY = QtCharts.QValueAxis()
        self.chart.setAxisX(self.axisX, self.lineSeries)
{'fraction_non_alphanumeric': 0.09784979744468682, 'fraction_numerical': 0.004362729822374571, 'mean_word_length': 2.7024221453287196, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1035659', 'n_tokens_mistral': 971, 'n_tokens_neox': 935, 'n_words': 213}