# Path: pyneb/utils/misc.py
# def int_to_roman(input_):
#     """
#     Convert an integer to Roman numerals.
#     
#     Examples:
#     >>> int_to_roman(0)
#     Traceback (most recent call last):
#     ValueError: Argument must be between 1 and 3999
#     
#     >>> int_to_roman(-1)
#     Traceback (most recent call last):
#     ValueError: Argument must be between 1 and 3999
#     
#     >>> int_to_roman(1.5)
#     Traceback (most recent call last):
#     TypeError: expected integer, got <type 'float'>
#     
#     >>> print int_to_roman(2000)
#     MM
# 
#     >>> print int_to_roman(1999)
#     MCMXCIX
# 
#     """
#     if type(input_) != type(1):
#         #raise TypeError, "expected integer, got %s" % type(input_)
#         return None
#     if not 0 < input_ < 4000:
#         #raise ValueError, "Argument must be between 1 and 3999"
#         return None
#     ints = (1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1)
#     nums = ('M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I')
#     result = ""
#     for i in range(len(ints)):
#         count = int(input_ / ints[i])
#         result += nums[i] * count
#         input_ -= ints[i] * count
#     return result
# 
# def parseAtom(atom):
#     '''
#     Parses an atom label into the element and spectrum parts
#     '''
# 
#     iso = ''
#     elem = ''
#     spec = ''
#     cont = True
#     firstdigit = True
#     for l in atom:
#         if l.isalpha() and cont:
#             elem += l
#             firstdigit = False
#         elif l.isdigit():
#             if firstdigit:
#                 iso += l
#             else:
#                 spec += l
#                 cont = False
#     return iso+str.capitalize(elem), spec


import pyneb as pn
import numpy as np
    import matplotlib as mpl
    import matplotlib.pyplot as plt
    from matplotlib.ticker import MaxNLocator
from pyneb.utils.misc import int_to_roman, parseAtom
                                    ax.plot(x_dots, y_dots, color=data['color'],
                                            marker='o', linestyle='None', label='_nolegend_')
                                y_lines = data['atom'].getOmega(tem_funct, j, i)
                                if y_lines.sum() > 0.:
                                    ax.plot(x_lines, y_lines,
                                            color=data['color'], label='_nolegend_')
                            except:
                                pn.log_.warn('Problem with plotting a data set', calling=self.calling)
# Draws vertical lines at selected temperature values (only once for each subplot, hence "first") 
                        if (first and (data['atom'].collNLevels == coll_n_max)):
                            for tem in self.ref_tem:
                                ax.axvline(tem, c='blue', alpha=0.4, ls=':')
                            lbl = "$\Omega$" + "(" + str(j) + "," + str(i) + ")"
                            ax.text(0.95, 0.95, lbl, transform=ax.transAxes, ha="right", va="top")   
                            first_done = True                                 
                        # Maximum number of ticks to avoid overcrowding
                        ax.xaxis.set_major_locator(MaxNLocator(4))
                        ax.yaxis.set_major_locator(MaxNLocator(3))
            # The line type and identifier of each data set are stored for the legend
            legend_lines.append(mpl.lines.Line2D(tem_funct, tem_funct, color=data['color'], linestyle='-'))
            legend_text.append(data['ID'])
            if first_done:
                first = False
        # The label of the reference temperature values are only plotted above the last plot
        for tem in self.ref_tem:
            ax.text(tem, ax.get_ylim()[1], ' %0.0f K' % (10 ** tem), ha="left", va="bottom", 
                    rotation=65, fontsize=12, color='#FF0000', alpha=0.35)
        # Axis labels, title and legend    
        fig.text(.5, .05, "Log($T_e/K$)", fontsize=16, ha='center', va='top')
        fig.text(.05, .5, "$\Omega$", va='center', fontsize=20, rotation=90)

# Path: pyneb/utils/misc.py
# def int_to_roman(input_):
#     """
#     Convert an integer to Roman numerals.
#     
#     Examples:
#     >>> int_to_roman(0)
#     Traceback (most recent call last):
#     ValueError: Argument must be between 1 and 3999
#     
#     >>> int_to_roman(-1)
#     Traceback (most recent call last):
#     ValueError: Argument must be between 1 and 3999
#     
#     >>> int_to_roman(1.5)
#     Traceback (most recent call last):
#     TypeError: expected integer, got <type 'float'>
#     
#     >>> print int_to_roman(2000)
#     MM
# 
#     >>> print int_to_roman(1999)
#     MCMXCIX
# 
#     """
#     if type(input_) != type(1):
#         #raise TypeError, "expected integer, got %s" % type(input_)
#         return None
#     if not 0 < input_ < 4000:
#         #raise ValueError, "Argument must be between 1 and 3999"
#         return None
#     ints = (1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1)
#     nums = ('M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I')
#     result = ""
#     for i in range(len(ints)):
#         count = int(input_ / ints[i])
#         result += nums[i] * count
#         input_ -= ints[i] * count
#     return result
# 
# def parseAtom(atom):
#     '''
#     Parses an atom label into the element and spectrum parts
#     '''
# 
#     iso = ''
#     elem = ''
#     spec = ''
#     cont = True
#     firstdigit = True
#     for l in atom:
#         if l.isalpha() and cont:
#             elem += l
#             firstdigit = False
#         elif l.isdigit():
#             if firstdigit:
#                 iso += l
#             else:
#                 spec += l
#                 cont = False
#     return iso+str.capitalize(elem), spec


# Path: pyneb/plot/plotAtomicData.py
import pyneb as pn
import numpy as np
    import matplotlib as mpl
    import matplotlib.pyplot as plt
    from matplotlib.ticker import MaxNLocator
from pyneb.utils.misc import int_to_roman, parseAtom

                                    ax.plot(x_dots, y_dots, color=data['color'],
                                            marker='o', linestyle='None', label='_nolegend_')
                                y_lines = data['atom'].getOmega(tem_funct, j, i)
                                if y_lines.sum() > 0.:
                                    ax.plot(x_lines, y_lines,
                                            color=data['color'], label='_nolegend_')
                            except:
                                pn.log_.warn('Problem with plotting a data set', calling=self.calling)
# Draws vertical lines at selected temperature values (only once for each subplot, hence "first") 
                        if (first and (data['atom'].collNLevels == coll_n_max)):
                            for tem in self.ref_tem:
                                ax.axvline(tem, c='blue', alpha=0.4, ls=':')
                            lbl = "$\Omega$" + "(" + str(j) + "," + str(i) + ")"
                            ax.text(0.95, 0.95, lbl, transform=ax.transAxes, ha="right", va="top")   
                            first_done = True                                 
                        # Maximum number of ticks to avoid overcrowding
                        ax.xaxis.set_major_locator(MaxNLocator(4))
                        ax.yaxis.set_major_locator(MaxNLocator(3))
            # The line type and identifier of each data set are stored for the legend
            legend_lines.append(mpl.lines.Line2D(tem_funct, tem_funct, color=data['color'], linestyle='-'))
            legend_text.append(data['ID'])
            if first_done:
                first = False
        # The label of the reference temperature values are only plotted above the last plot
        for tem in self.ref_tem:
            ax.text(tem, ax.get_ylim()[1], ' %0.0f K' % (10 ** tem), ha="left", va="bottom", 
                    rotation=65, fontsize=12, color='#FF0000', alpha=0.35)
        # Axis labels, title and legend    
        fig.text(.5, .05, "Log($T_e/K$)", fontsize=16, ha='center', va='top')
        fig.text(.05, .5, "$\Omega$", va='center', fontsize=20, rotation=90)

        fig.text(.5, .95, "[%s %s] collision strengths" % (self.elem, int_to_roman(int(self.spec))), 