defining a substitution box for AES in SMT solvers - cryptography

How do I define a function which performs a substitution of values according to the table here?
static const unsigned char FSb[256] =
{
0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5,
0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76,
0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0,
0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0,
0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC,
0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15,
0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A,
0x07, 0x12, 0x80, 0xE2, 0xEB, 0x27, 0xB2, 0x75,
0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0,
0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84,
0x53, 0xD1, 0x00, 0xED, 0x20, 0xFC, 0xB1, 0x5B,
0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF,
0xD0, 0xEF, 0xAA, 0xFB, 0x43, 0x4D, 0x33, 0x85,
0x45, 0xF9, 0x02, 0x7F, 0x50, 0x3C, 0x9F, 0xA8,
0x51, 0xA3, 0x40, 0x8F, 0x92, 0x9D, 0x38, 0xF5,
0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2,
0xCD, 0x0C, 0x13, 0xEC, 0x5F, 0x97, 0x44, 0x17,
0xC4, 0xA7, 0x7E, 0x3D, 0x64, 0x5D, 0x19, 0x73,
0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A, 0x90, 0x88,
0x46, 0xEE, 0xB8, 0x14, 0xDE, 0x5E, 0x0B, 0xDB,
0xE0, 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C,
0xC2, 0xD3, 0xAC, 0x62, 0x91, 0x95, 0xE4, 0x79,
0xE7, 0xC8, 0x37, 0x6D, 0x8D, 0xD5, 0x4E, 0xA9,
0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08,
0xBA, 0x78, 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6,
0xE8, 0xDD, 0x74, 0x1F, 0x4B, 0xBD, 0x8B, 0x8A,
0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E,
0x61, 0x35, 0x57, 0xB9, 0x86, 0xC1, 0x1D, 0x9E,
0xE1, 0xF8, 0x98, 0x11, 0x69, 0xD9, 0x8E, 0x94,
0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55, 0x28, 0xDF,
0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68,
0x41, 0x99, 0x2D, 0x0F, 0xB0, 0x54, 0xBB, 0x16
};
I was thinking about it the whole day, but to avail, I am still stuck on this problem. Any suggestions/ answers is welcome. Thanks!

Assert the equality of the select at each index to be the constant at that index in the table that you gave.
(declare-fun FSb () (Array (_ BitVec 8) (_ BitVec 8)))
(assert (= (select FSb #x00) #x63))
(assert (= (select FSb #x01) #x7C))
...
(FSB could also be modeled as an uninterpreted function.)
The define-fun version of the above will result in a long cascade of ites. This is likely to be a lot less efficient.

Related

matplotlib - set font to Times New Roman

I want to use Times New Roman font with my matplotlib plots. I'm currently using matplotlib-3.5.1 and I have fonttools-4.28.5 installed. However, when I try:
plt.rcParams["font.family"] = "Times New Roman"
The font doesn't change. I then found a recommendation to instead try:
plt.rcParams["font.family"] = "DejaVu Serif"
plt.rcParams["font.serif"] = ["Times New Roman"]
This also had no effect. What am I doing wrong and how do I fix it?
I already looked at other posts e.g. 1, 2 to no avail.
Edit: Following this post, it appears that matplotlib doesn't have Times New Roman?
['C059', 'C059', 'C059', 'C059', 'D050000L', 'DejaVu LGC Sans Mono', 'DejaVu LGC Sans Mono', 'DejaVu LGC Sans Mono', 'DejaVu LGC Sans Mono', 'DejaVu Sans', 'DejaVu Sans', 'DejaVu Sans', 'DejaVu Sans', 'DejaVu Sans', 'DejaVu Sans', 'DejaVu Sans', 'DejaVu Sans', 'DejaVu Sans', 'DejaVu Sans', 'DejaVu Sans', 'DejaVu Sans', 'DejaVu Sans', 'DejaVu Sans Display', 'DejaVu Sans Mono', 'DejaVu Sans Mono', 'DejaVu Sans Mono', 'DejaVu Sans Mono', 'DejaVu Sans Mono', 'DejaVu Sans Mono', 'DejaVu Sans Mono', 'DejaVu Sans Mono', 'DejaVu Serif', 'DejaVu Serif', 'DejaVu Serif', 'DejaVu Serif', 'DejaVu Serif Display', 'Liberation Mono', 'Liberation Mono', 'Liberation Mono', 'Liberation Mono', 'Nimbus Mono PS', 'Nimbus Mono PS', 'Nimbus Mono PS', 'Nimbus Mono PS', 'Nimbus Roman', 'Nimbus Roman', 'Nimbus Roman', 'Nimbus Roman', 'Nimbus Sans', 'Nimbus Sans', 'Nimbus Sans', 'Nimbus Sans', 'Nimbus Sans Narrow', 'Nimbus Sans Narrow', 'Nimbus Sans Narrow', 'Nimbus Sans Narrow', 'P052', 'P052', 'P052', 'P052', 'STIX', 'STIX', 'STIX', 'STIX', 'STIX Math', 'STIXGeneral', 'STIXGeneral', 'STIXGeneral', 'STIXGeneral', 'STIXNonUnicode', 'STIXNonUnicode', 'STIXNonUnicode', 'STIXNonUnicode', 'STIXSizeFiveSym', 'STIXSizeFourSym', 'STIXSizeFourSym', 'STIXSizeOneSym', 'STIXSizeOneSym', 'STIXSizeThreeSym', 'STIXSizeThreeSym', 'STIXSizeTwoSym', 'STIXSizeTwoSym', 'URW Bookman', 'URW Bookman', 'URW Bookman', 'URW Bookman', 'URW Gothic', 'URW Gothic', 'URW Gothic', 'URW Gothic', 'Z003', 'cmb10', 'cmex10', 'cmmi10', 'cmr10', 'cmss10', 'cmsy10', 'cmtt10']
Following https://matplotlib.org/stable/gallery/text_labels_and_annotations/font_family_rc_sgskip.html?highlight=font#configuring-the-font-family, this should work:
plt.rcParams["font.family"] = "serif"
plt.rcParams["font.serif"] = ["Times New Roman"]

Out of memory error when adding comboboxes to userForm

I have a MS Word document which has vba macro. I have too many comboboxes in my userform. After a point i can not add a new comboboxes. When I click to view code button, it gives me out of memory error. I'm adding my userForm to below.
My vba codes are like this
Private Sub UserForm_Activate()
hpcStage4
End Sub
Private Sub hpcStage4()
Me.cmbHPC4_1.List = Array("Serviceable", "Unserviceable", "N/A per WS")
Me.cmbHPC4_2.List = Array("Serviceable", "Unserviceable", "N/A per WS")
Me.cmbHPC4_3.List = Array("Serviceable", "Unserviceable", "N/A per WS")
Me.cmbHPC4_4.List = Array("Serviceable", "Unserviceable", "N/A per WS")
Me.cmbHPC4_5.List = Array("Serviceable", "Unserviceable", "N/A per WS")
Me.cmbHPC4_6.List = Array("Serviceable", "Unserviceable", "N/A per WS")
Me.cmbHPC4_7.List = Array("Serviceable", "Unserviceable", "N/A per WS")
Me.cmbHPC4_8.List = Array("Serviceable", "Unserviceable", "N/A per WS")
Me.cmbHPC4_9.List = Array("Serviceable", "Unserviceable", "N/A per WS")
Me.cmbHPC4_10.List = Array("Serviceable", "Unserviceable", "N/A per WS")
Me.cmbHPC4_11.List = Array("Dent", "Nick", "Coating Damage", "Organic Redidues", "Dirt", "Trace", "Deposits", "Mineral Deposits", "Superficial Imperfection", "Scratch", "Scored", "Crack", "Axial Crack", "Radial Crack", "Circumferencial Crack", "Chordwise Crack", "Tip Connected Radial Crack", "Connected Loop Crack", "Full Crack", "Multi Cracks", "Tight Crack", "Burn", "Edge Burnback", "Burn Hole", "LE Burn Hole", "Burn Through Hole", "Burn Through", "Corrosion", "Discoloration", "Oxidation", "Sulphidation", "Erosion", "Blistering", "Pitting", "Peeling", "Ceramic Coating Detachment", "Missing Thermal Barrier Coating", "Tip rub", "Burr", "Curled", "Tip Curled", "Tip Corner Curled", "Missing Tip Corner", "Overlap", "Shingling", "Unlatching", "Out Of Flush", "Missing Material", "Missing Piece", "Chipped", "Flaking", "Lift Up", "Bulging", "Spalled", "Bent", "Distortion", "Tear", "Torn", "Wear", "Worn", "Plugged Air Slot", "Damper Wire Extrusion")
Me.cmbHPC4_12.List = Array("Dent", "Nick", "Coating Damage", "Organic Redidues", "Dirt", "Trace", "Deposits", "Mineral Deposits", "Superficial Imperfection", "Scratch", "Scored", "Crack", "Axial Crack", "Radial Crack", "Circumferencial Crack", "Chordwise Crack", "Tip Connected Radial Crack", "Connected Loop Crack", "Full Crack", "Multi Cracks", "Tight Crack", "Burn", "Edge Burnback", "Burn Hole", "LE Burn Hole", "Burn Through Hole", "Burn Through", "Corrosion", "Discoloration", "Oxidation", "Sulphidation", "Erosion", "Blistering", "Pitting", "Peeling", "Ceramic Coating Detachment", "Missing Thermal Barrier Coating", "Tip rub", "Burr", "Curled", "Tip Curled", "Tip Corner Curled", "Missing Tip Corner", "Overlap", "Shingling", "Unlatching", "Out Of Flush", "Missing Material", "Missing Piece", "Chipped", "Flaking", "Lift Up", "Bulging", "Spalled", "Bent", "Distortion", "Tear", "Torn", "Wear", "Worn", "Plugged Air Slot", "Damper Wire Extrusion")
Me.cmbHPC4_13.List = Array("Dent", "Nick", "Coating Damage", "Organic Redidues", "Dirt", "Trace", "Deposits", "Mineral Deposits", "Superficial Imperfection", "Scratch", "Scored", "Crack", "Axial Crack", "Radial Crack", "Circumferencial Crack", "Chordwise Crack", "Tip Connected Radial Crack", "Connected Loop Crack", "Full Crack", "Multi Cracks", "Tight Crack", "Burn", "Edge Burnback", "Burn Hole", "LE Burn Hole", "Burn Through Hole", "Burn Through", "Corrosion", "Discoloration", "Oxidation", "Sulphidation", "Erosion", "Blistering", "Pitting", "Peeling", "Ceramic Coating Detachment", "Missing Thermal Barrier Coating", "Tip rub", "Burr", "Curled", "Tip Curled", "Tip Corner Curled", "Missing Tip Corner", "Overlap", "Shingling", "Unlatching", "Out Of Flush", "Missing Material", "Missing Piece", "Chipped", "Flaking", "Lift Up", "Bulging", "Spalled", "Bent", "Distortion", "Tear", "Torn", "Wear", "Worn", "Plugged Air Slot", "Damper Wire Extrusion")
Me.cmbHPC4_14.List = Array("Dent", "Nick", "Coating Damage", "Organic Redidues", "Dirt", "Trace", "Deposits", "Mineral Deposits", "Superficial Imperfection", "Scratch", "Scored", "Crack", "Axial Crack", "Radial Crack", "Circumferencial Crack", "Chordwise Crack", "Tip Connected Radial Crack", "Connected Loop Crack", "Full Crack", "Multi Cracks", "Tight Crack", "Burn", "Edge Burnback", "Burn Hole", "LE Burn Hole", "Burn Through Hole", "Burn Through", "Corrosion", "Discoloration", "Oxidation", "Sulphidation", "Erosion", "Blistering", "Pitting", "Peeling", "Ceramic Coating Detachment", "Missing Thermal Barrier Coating", "Tip rub", "Burr", "Curled", "Tip Curled", "Tip Corner Curled", "Missing Tip Corner", "Overlap", "Shingling", "Unlatching", "Out Of Flush", "Missing Material", "Missing Piece", "Chipped", "Flaking", "Lift Up", "Bulging", "Spalled", "Bent", "Distortion", "Tear", "Torn", "Wear", "Worn", "Plugged Air Slot", "Damper Wire Extrusion")
Me.cmbHPC4_15.List = Array("Dent", "Nick", "Coating Damage", "Organic Redidues", "Dirt", "Trace", "Deposits", "Mineral Deposits", "Superficial Imperfection", "Scratch", "Scored", "Crack", "Axial Crack", "Radial Crack", "Circumferencial Crack", "Chordwise Crack", "Tip Connected Radial Crack", "Connected Loop Crack", "Full Crack", "Multi Cracks", "Tight Crack", "Burn", "Edge Burnback", "Burn Hole", "LE Burn Hole", "Burn Through Hole", "Burn Through", "Corrosion", "Discoloration", "Oxidation", "Sulphidation", "Erosion", "Blistering", "Pitting", "Peeling", "Ceramic Coating Detachment", "Missing Thermal Barrier Coating", "Tip rub", "Burr", "Curled", "Tip Curled", "Tip Corner Curled", "Missing Tip Corner", "Overlap", "Shingling", "Unlatching", "Out Of Flush", "Missing Material", "Missing Piece", "Chipped", "Flaking", "Lift Up", "Bulging", "Spalled", "Bent", "Distortion", "Tear", "Torn", "Wear", "Worn", "Plugged Air Slot", "Damper Wire Extrusion")
Me.cmbHPC4_16.List = Array("Dent", "Nick", "Coating Damage", "Organic Redidues", "Dirt", "Trace", "Deposits", "Mineral Deposits", "Superficial Imperfection", "Scratch", "Scored", "Crack", "Axial Crack", "Radial Crack", "Circumferencial Crack", "Chordwise Crack", "Tip Connected Radial Crack", "Connected Loop Crack", "Full Crack", "Multi Cracks", "Tight Crack", "Burn", "Edge Burnback", "Burn Hole", "LE Burn Hole", "Burn Through Hole", "Burn Through", "Corrosion", "Discoloration", "Oxidation", "Sulphidation", "Erosion", "Blistering", "Pitting", "Peeling", "Ceramic Coating Detachment", "Missing Thermal Barrier Coating", "Tip rub", "Burr", "Curled", "Tip Curled", "Tip Corner Curled", "Missing Tip Corner", "Overlap", "Shingling", "Unlatching", "Out Of Flush", "Missing Material", "Missing Piece", "Chipped", "Flaking", "Lift Up", "Bulging", "Spalled", "Bent", "Distortion", "Tear", "Torn", "Wear", "Worn", "Plugged Air Slot", "Damper Wire Extrusion")
Me.cmbHPC4_17.List = Array("Dent", "Nick", "Coating Damage", "Organic Redidues", "Dirt", "Trace", "Deposits", "Mineral Deposits", "Superficial Imperfection", "Scratch", "Scored", "Crack", "Axial Crack", "Radial Crack", "Circumferencial Crack", "Chordwise Crack", "Tip Connected Radial Crack", "Connected Loop Crack", "Full Crack", "Multi Cracks", "Tight Crack", "Burn", "Edge Burnback", "Burn Hole", "LE Burn Hole", "Burn Through Hole", "Burn Through", "Corrosion", "Discoloration", "Oxidation", "Sulphidation", "Erosion", "Blistering", "Pitting", "Peeling", "Ceramic Coating Detachment", "Missing Thermal Barrier Coating", "Tip rub", "Burr", "Curled", "Tip Curled", "Tip Corner Curled", "Missing Tip Corner", "Overlap", "Shingling", "Unlatching", "Out Of Flush", "Missing Material", "Missing Piece", "Chipped", "Flaking", "Lift Up", "Bulging", "Spalled", "Bent", "Distortion", "Tear", "Torn", "Wear", "Worn", "Plugged Air Slot", "Damper Wire Extrusion")
Me.cmbHPC4_18.List = Array("Dent", "Nick", "Coating Damage", "Organic Redidues", "Dirt", "Trace", "Deposits", "Mineral Deposits", "Superficial Imperfection", "Scratch", "Scored", "Crack", "Axial Crack", "Radial Crack", "Circumferencial Crack", "Chordwise Crack", "Tip Connected Radial Crack", "Connected Loop Crack", "Full Crack", "Multi Cracks", "Tight Crack", "Burn", "Edge Burnback", "Burn Hole", "LE Burn Hole", "Burn Through Hole", "Burn Through", "Corrosion", "Discoloration", "Oxidation", "Sulphidation", "Erosion", "Blistering", "Pitting", "Peeling", "Ceramic Coating Detachment", "Missing Thermal Barrier Coating", "Tip rub", "Burr", "Curled", "Tip Curled", "Tip Corner Curled", "Missing Tip Corner", "Overlap", "Shingling", "Unlatching", "Out Of Flush", "Missing Material", "Missing Piece", "Chipped", "Flaking", "Lift Up", "Bulging", "Spalled", "Bent", "Distortion", "Tear", "Torn", "Wear", "Worn", "Plugged Air Slot", "Damper Wire Extrusion")
Me.cmbHPC4_19.List = Array("Dent", "Nick", "Coating Damage", "Organic Redidues", "Dirt", "Trace", "Deposits", "Mineral Deposits", "Superficial Imperfection", "Scratch", "Scored", "Crack", "Axial Crack", "Radial Crack", "Circumferencial Crack", "Chordwise Crack", "Tip Connected Radial Crack", "Connected Loop Crack", "Full Crack", "Multi Cracks", "Tight Crack", "Burn", "Edge Burnback", "Burn Hole", "LE Burn Hole", "Burn Through Hole", "Burn Through", "Corrosion", "Discoloration", "Oxidation", "Sulphidation", "Erosion", "Blistering", "Pitting", "Peeling", "Ceramic Coating Detachment", "Missing Thermal Barrier Coating", "Tip rub", "Burr", "Curled", "Tip Curled", "Tip Corner Curled", "Missing Tip Corner", "Overlap", "Shingling", "Unlatching", "Out Of Flush", "Missing Material", "Missing Piece", "Chipped", "Flaking", "Lift Up", "Bulging", "Spalled", "Bent", "Distortion", "Tear", "Torn", "Wear", "Worn", "Plugged Air Slot", "Damper Wire Extrusion")
Me.cmbHPC4_20.List = Array("Dent", "Nick", "Coating Damage", "Organic Redidues", "Dirt", "Trace", "Deposits", "Mineral Deposits", "Superficial Imperfection", "Scratch", "Scored", "Crack", "Axial Crack", "Radial Crack", "Circumferencial Crack", "Chordwise Crack", "Tip Connected Radial Crack", "Connected Loop Crack", "Full Crack", "Multi Cracks", "Tight Crack", "Burn", "Edge Burnback", "Burn Hole", "LE Burn Hole", "Burn Through Hole", "Burn Through", "Corrosion", "Discoloration", "Oxidation", "Sulphidation", "Erosion", "Blistering", "Pitting", "Peeling", "Ceramic Coating Detachment", "Missing Thermal Barrier Coating", "Tip rub", "Burr", "Curled", "Tip Curled", "Tip Corner Curled", "Missing Tip Corner", "Overlap", "Shingling", "Unlatching", "Out Of Flush", "Missing Material", "Missing Piece", "Chipped", "Flaking", "Lift Up", "Bulging", "Spalled", "Bent", "Distortion", "Tear", "Torn", "Wear", "Worn", "Plugged Air Slot", "Damper Wire Extrusion")
Me.cmbHPC4_21.List = Array("EM TASK 72-00-00-200-002-B00", "AMM 72-00-00-200-016-B", "AMM 72-00-00-200-016-B01")
Me.cmbHPC4_22.List = Array("EM TASK 72-00-00-200-002-B00", "AMM 72-00-00-200-016-B", "AMM 72-00-00-200-016-B01")
Me.cmbHPC4_23.List = Array("EM TASK 72-00-00-200-002-B00", "AMM 72-00-00-200-016-B", "AMM 72-00-00-200-016-B01")
Me.cmbHPC4_24.List = Array("EM TASK 72-00-00-200-002-B00", "AMM 72-00-00-200-016-B", "AMM 72-00-00-200-016-B01")
Me.cmbHPC4_25.List = Array("EM TASK 72-00-00-200-002-B00", "AMM 72-00-00-200-016-B", "AMM 72-00-00-200-016-B01")
Me.cmbHPC4_26.List = Array("EM TASK 72-00-00-200-002-B00", "AMM 72-00-00-200-016-B", "AMM 72-00-00-200-016-B01")
Me.cmbHPC4_27.List = Array("EM TASK 72-00-00-200-002-B00", "AMM 72-00-00-200-016-B", "AMM 72-00-00-200-016-B01")
Me.cmbHPC4_28.List = Array("EM TASK 72-00-00-200-002-B00", "AMM 72-00-00-200-016-B", "AMM 72-00-00-200-016-B01")
Me.cmbHPC4_29.List = Array("EM TASK 72-00-00-200-002-B00", "AMM 72-00-00-200-016-B", "AMM 72-00-00-200-016-B01")
Me.cmbHPC4_30.List = Array("EM TASK 72-00-00-200-002-B00", "AMM 72-00-00-200-016-B", "AMM 72-00-00-200-016-B01")
End Sub
What can be cause this issue?

Modify Word Document Multilevel list to include all depth

I have a word document that has a 4 level deep multilevel list. I would like to modify the list styles (temporarily) to show the entire depth of the numbers. For instance, rather than just showing (iii), I want to modify it to show 1.1(a)(iii). I have seen instructions of attaching the style to the list, but I'm not sure how to write the style to show what I want.
So, all of the searching and the replies have not resulted in a working solution, yet, but I did discover that the .docx file is a zipped collection of xml files. So, after looking inside the docx file and the numbering.xml sub-file, I found the following section that seems to define the style for the numbering I am looking to change:
<w:abstractNum w:abstractNumId="93" w15:restartNumberingAfterBreak="0">
<w:nsid w:val="5FE75E67"/>
<w:multiLevelType w:val="multilevel"/>
<w:tmpl w:val="9C366D9C"/>
<w:lvl w:ilvl="0">
<w:start w:val="1"/>
<w:numFmt w:val="decimal"/>
<w:pStyle w:val="ArticleCL1"/>
<w:lvlText w:val="%1"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="720"/>
</w:tabs>
<w:ind w:left="0" w:firstLine="0"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Times New Roman"/>
<w:b/>
<w:i w:val="0"/>
<w:caps/>
<w:smallCaps w:val="0"/>
<w:sz w:val="22"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="1">
<w:start w:val="1"/>
<w:numFmt w:val="decimal"/>
<w:pStyle w:val="ArticleCL2"/>
<w:lvlText w:val="%1.%2"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="720"/>
</w:tabs>
<w:ind w:left="720" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Times New Roman"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="22"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="2">
<w:start w:val="1"/>
<w:numFmt w:val="lowerLetter"/>
<w:pStyle w:val="ArticleCL3"/>
<w:lvlText w:val="(%3)"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="720"/>
</w:tabs>
<w:ind w:left="720" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Times New Roman"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="22"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="3">
<w:start w:val="1"/>
<w:numFmt w:val="lowerRoman"/>
<w:pStyle w:val="ArticleCL4"/>
<w:lvlText w:val="(%4)"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="1440"/>
</w:tabs>
<w:ind w:left="1440" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Times New Roman"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="22"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="4">
<w:start w:val="1"/>
<w:numFmt w:val="lowerLetter"/>
<w:pStyle w:val="ArticleCL5"/>
<w:lvlText w:val="%5."/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="2160"/>
</w:tabs>
<w:ind w:left="2160" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Times New Roman"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="24"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="5">
<w:start w:val="1"/>
<w:numFmt w:val="decimal"/>
<w:pStyle w:val="ArticleCL6"/>
<w:lvlText w:val="%6."/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="2160"/>
</w:tabs>
<w:ind w:left="2160" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Calibri" w:hAnsi="Calibri" w:cs="Times New Roman" w:hint="default"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="22"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="6">
<w:start w:val="1"/>
<w:numFmt w:val="bullet"/>
<w:lvlRestart w:val="0"/>
<w:pStyle w:val="ArticleCL7"/>
<w:lvlText w:val="·"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="1440"/>
</w:tabs>
<w:ind w:left="1440" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" w:hint="default"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="24"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="7">
<w:start w:val="1"/>
<w:numFmt w:val="bullet"/>
<w:lvlRestart w:val="0"/>
<w:pStyle w:val="ArticleCL8"/>
<w:lvlText w:val="·"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="2160"/>
</w:tabs>
<w:ind w:left="2160" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" w:hint="default"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:sz w:val="24"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
<w:lvl w:ilvl="8">
<w:start w:val="1"/>
<w:numFmt w:val="bullet"/>
<w:pStyle w:val="ArticleCL9"/>
<w:lvlText w:val="·"/>
<w:lvlJc w:val="left"/>
<w:pPr>
<w:tabs>
<w:tab w:val="num" w:pos="2880"/>
</w:tabs>
<w:ind w:left="2880" w:hanging="720"/>
</w:pPr>
<w:rPr>
<w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" w:hint="default"/>
<w:b w:val="0"/>
<w:i w:val="0"/>
<w:caps w:val="0"/>
<w:color w:val="auto"/>
<w:sz w:val="24"/>
<w:u w:val="none"/>
</w:rPr>
</w:lvl>
Hopefully, this means that I can change the w:lvlText w:val="(%3) for w:ilvl="2" using VBA. Still investigating.
Thanks!
Rod
Well, it turns out that you can, indeed, directly modify a multiLevelList style at any level if you know how to refer to it. Using the xml file I referenced, I found that the third level style, ArticleC_L3, had it's number format set to "(%3)" which is what I wanted to change. It was in an abstract with AbstractNumId="93". The following code changes that setting:
wDoc.ListTemplates(94).ListLevels(3).NumberFormat = "%1.%2.%3"
You will notice that the ListTemplates number is one higher, and the ListLevels ID is likewise one higher. In either case, to find the precise place you need to refer to, the best workflow I have found is:
1. In the word doc, click on the number/bullet for the level you are trying to change.
2. Click the little dropdown arrow in the styles box so you can see what the style name is for that level.
3. Look in numbering.xml to see which number style is using that style name. For me the line read <w:pStyle w:val="ArticleCL3"/>
4. Follow the xml tree up to find out what level of the numbering style this is. For me the line read <w:lvl w:ilvl="2">
5. Continue to follow the xml tree up to find out what Template number the level is in. For me the line read <w:abstractNum w:abstractNumId="93" w15:restartNumberingAfterBreak="0">
6. Now you can refer to the exact level format as in the line I shared at the start.
Thanks for eveyone's help!
Rod
Presumably, something based on:
Sub ApplyMultiLevelStyleNumbers()
Dim LT As ListTemplate, i As Long
Set LT = ActiveDocument.ListTemplates.Add(OutlineNumbered:=True)
For i = 1 To 4
With LT.ListLevels(i)
.NumberFormat = Choose(i, "%1", "%1.%2", "%1.%2.%3", "%1.%2.%3.%4")
.Font.Bold = True
.ResetOnHigher = True
.StartAt = 1
.LinkedStyle = "ArticleC_L" & i
End With
Next
End Sub
The above assumes your four styles are named ArticleC_L1 - ArticleC_L4.

Difference in Treatment of Floats Between Plots and Bar Plots in Matplotlib

I have a working plot using the following code:
import datetime as dt
import matplotlib.dates as mdate
import matplotlib.pyplot as plt
x = ['2016-06-20 21:00:02.313000', '2016-06-20 21:15:01.855000', '2016-06-20 21:30:01.690000', '2016-06-20 21:45:01.882000', '2016-06-20 22:00:02.005000', '2016-06-20 22:15:01.730000', '2016-06-20 22:30:01.479000', '2016-06-20 22:45:01.638000', '2016-06-20 23:00:01.886000', '2016-06-20 23:15:01.682000', '2016-06-20 23:30:01.653000', '2016-06-20 23:45:01.690000', '2016-06-21 00:00:02.196000', '2016-06-21 00:15:01.658000', '2016-06-21 00:30:01.514000', '2016-06-21 00:45:01.542000', '2016-06-21 01:00:01.291000', '2016-06-21 01:15:01.551000', '2016-06-21 01:30:01.439000', '2016-06-21 01:45:01.543000', '2016-06-21 02:00:01.449000', '2016-06-21 02:15:01.589000', '2016-06-21 02:30:01.555000', '2016-06-21 02:45:01.076000', '2016-06-21 03:00:01.588000', '2016-06-21 03:15:01.429000', '2016-06-21 03:30:01.029000', '2016-06-21 03:45:01.358000', '2016-06-21 04:00:01.460000', '2016-06-21 04:15:01.528000', '2016-06-21 04:30:01.366000', '2016-06-21 04:45:01.078000', '2016-06-21 05:00:01.541000', '2016-06-21 05:15:01.351000', '2016-06-21 05:30:01.618000', '2016-06-21 05:45:01.283000', '2016-06-21 06:00:01.297000', '2016-06-21 06:15:01.226000', '2016-06-21 06:30:01.219000', '2016-06-21 06:45:01.401000', '2016-06-21 07:00:01.410000', '2016-06-21 07:15:01.129000', '2016-06-21 07:30:01.420000', '2016-06-21 07:45:00.885000', '2016-06-21 08:00:01.338000', '2016-06-21 08:15:01.178000', '2016-06-21 08:30:01.148000', '2016-06-21 08:45:01.112000', '2016-06-21 09:00:01.357000', '2016-06-21 09:15:01.150000', '2016-06-21 09:30:00.814000', '2016-06-21 09:45:02.252000', '2016-06-21 10:00:01.757000', '2016-06-21 10:15:02.180000', '2016-06-21 10:30:02.188000', '2016-06-21 10:45:01.477000', '2016-06-21 11:00:02.100000', '2016-06-21 11:15:01.983000', '2016-06-21 11:30:02.038000', '2016-06-21 11:45:01.841000', '2016-06-21 12:00:01.825000', '2016-06-21 12:15:01.551000', '2016-06-21 12:30:01.716000', '2016-06-21 12:45:01.791000', '2016-06-21 13:00:02.297000', '2016-06-21 13:15:01.880000', '2016-06-21 13:30:01.433000', '2016-06-21 13:45:01.469000', '2016-06-21 14:00:01.769000', '2016-06-21 14:15:01.742000', '2016-06-21 14:30:01.803000', '2016-06-21 14:45:01.462000', '2016-06-21 15:00:01.819000', '2016-06-21 15:15:01.680000', '2016-06-21 15:30:01.657000', '2016-06-21 15:45:01.480000', '2016-06-21 16:00:01.578000', '2016-06-21 16:15:01.198000', '2016-06-21 16:30:01.584000', '2016-06-21 16:45:01.823000', '2016-06-21 17:00:01.636000', '2016-06-21 17:15:01.599000', '2016-06-21 17:30:01.419000', '2016-06-21 17:45:01.600000', '2016-06-21 18:00:01.746000', '2016-06-21 18:15:01.463000', '2016-06-21 18:30:01.345000', '2016-06-21 18:45:01.680000', '2016-06-21 19:00:01.509000', '2016-06-21 19:15:01.489000', '2016-06-21 19:30:01.708000', '2016-06-21 19:45:01.223000', '2016-06-21 20:00:01.310000', '2016-06-21 20:15:01.288000', '2016-06-21 20:30:01.188000', '2016-06-21 20:45:01.190000', '2016-06-21 21:00:01.260000', '2016-06-21 21:15:01.250000', '2016-06-21 21:30:01.218000', '2016-06-21 21:45:01.212000', '2016-06-21 22:00:01.220000', '2016-06-21 22:15:00.912000', '2016-06-21 22:30:00.840000', '2016-06-21 22:45:01.031000', '2016-06-21 23:00:01.159000', '2016-06-21 23:15:01.037000', '2016-06-21 23:30:00.851000', '2016-06-21 23:45:01.312000', '2016-06-22 00:00:02.867000', '2016-06-22 00:15:02.093000', '2016-06-22 00:30:02.074000', '2016-06-22 00:45:01.943000', '2016-06-22 01:00:02.038000', '2016-06-22 01:15:02.057000', '2016-06-22 01:30:01.854000', '2016-06-22 01:45:02.364000', '2016-06-22 02:00:01.976000', '2016-06-22 02:15:01.887000', '2016-06-22 02:30:01.720000', '2016-06-22 02:45:01.736000', '2016-06-22 03:00:01.901000', '2016-06-22 03:15:01.872000', '2016-06-22 03:30:01.457000', '2016-06-22 03:45:01.524000', '2016-06-22 04:00:02.015000', '2016-06-22 04:15:01.838000', '2016-06-22 04:30:01.637000', '2016-06-22 04:45:01.730000', '2016-06-22 05:00:01.781000', '2016-06-22 05:15:01.999000', '2016-06-22 05:30:01.508000', '2016-06-22 05:45:01.532000', '2016-06-22 06:00:01.100000', '2016-06-22 06:15:01.263000', '2016-06-22 06:30:01.267000', '2016-06-22 06:45:01.611000', '2016-06-22 07:00:01.718000', '2016-06-22 07:15:01.512000', '2016-06-22 07:30:01.485000', '2016-06-22 07:45:01.618000', '2016-06-22 08:00:01.665000', '2016-06-22 08:15:01.347000', '2016-06-22 08:30:01.294000', '2016-06-22 08:45:01.345000', '2016-06-22 09:00:01.599000', '2016-06-22 09:15:01.481000', '2016-06-22 09:30:01.219000', '2016-06-22 09:45:01.099000', '2016-06-22 10:00:01.318000', '2016-06-22 10:15:00.792000', '2016-06-22 10:30:01.341000', '2016-06-22 10:45:01.680000', '2016-06-22 11:00:01.608000', '2016-06-22 11:15:01.496000', '2016-06-22 11:30:01.235000', '2016-06-22 11:45:01.428000', '2016-06-22 12:00:01.384000', '2016-06-22 12:15:01.136000', '2016-06-22 12:30:01.691000', '2016-06-22 12:45:01.247000', '2016-06-22 13:00:01.511000', '2016-06-22 13:15:00.956000', '2016-06-22 13:30:01.055000', '2016-06-22 13:45:01.042000', '2016-06-22 14:00:01.314000', '2016-06-22 14:15:01.211000', '2016-06-22 14:30:01.619000', '2016-06-22 14:45:01.990000', '2016-06-22 15:00:02.147000', '2016-06-22 15:15:01.906000', '2016-06-22 15:30:01.873000', '2016-06-22 15:45:02.065000', '2016-06-22 16:00:01.892000', '2016-06-22 16:15:01.823000', '2016-06-22 16:30:01.950000', '2016-06-22 16:45:01.871000', '2016-06-22 17:00:01.638000', '2016-06-22 17:15:01.664000', '2016-06-22 17:30:01.897000', '2016-06-22 17:45:01.862000', '2016-06-22 18:00:01.638000', '2016-06-22 18:15:01.700000', '2016-06-22 18:30:01.610000', '2016-06-22 18:45:01.589000', '2016-06-22 19:00:01.876000', '2016-06-22 19:15:01.849000', '2016-06-22 19:30:02.241000', '2016-06-22 19:45:01.752000', '2016-06-22 20:00:01.305000', '2016-06-22 20:15:01.584000', '2016-06-22 20:30:01.479000', '2016-06-22 20:45:01.448000', '2016-06-22 21:00:01.714000', '2016-06-22 21:15:01.626000', '2016-06-22 21:30:01.545000', '2016-06-22 21:45:01.426000', '2016-06-22 22:00:01.656000', '2016-06-22 22:15:01.653000', '2016-06-22 22:30:01.396000', '2016-06-22 22:45:01.529000', '2016-06-22 23:00:01.463000', '2016-06-22 23:15:00.991000', '2016-06-22 23:30:01.371000', '2016-06-22 23:45:01.804000', '2016-06-23 00:00:02.017000', '2016-06-23 00:15:01.199000', '2016-06-23 00:30:01.319000', '2016-06-23 00:45:01.383000', '2016-06-23 01:00:01.298000', '2016-06-23 01:15:01.327000', '2016-06-23 01:30:01.576000', '2016-06-23 01:45:01.166000', '2016-06-23 02:00:01.206000', '2016-06-23 02:15:01.202000', '2016-06-23 02:30:01.172000', '2016-06-23 02:45:01.088000', '2016-06-23 03:00:01.239000', '2016-06-23 03:15:01.062000', '2016-06-23 03:30:00.924000', '2016-06-23 03:45:01.009000', '2016-06-23 04:00:00.732000', '2016-06-23 04:15:01.003000', '2016-06-23 04:30:01.136000', '2016-06-23 04:45:02.176000', '2016-06-23 05:00:02.134000', '2016-06-23 05:15:02.031000', '2016-06-23 05:30:01.832000', '2016-06-23 05:45:02.024000', '2016-06-23 06:00:02.323000', '2016-06-23 06:15:02.567000', '2016-06-23 06:30:02.139000', '2016-06-23 06:45:01.507000', '2016-06-23 07:15:01.507000', '2016-06-23 07:30:01.896000', '2016-06-23 07:45:01.886000', '2016-06-23 08:00:01.877000', '2016-06-23 08:15:01.806000', '2016-06-23 08:30:02.031000', '2016-06-23 08:45:01.692000', '2016-06-23 09:00:02.013000', '2016-06-23 09:15:01.888000', '2016-06-23 09:30:01.843000', '2016-06-23 09:45:01.733000', '2016-06-23 10:00:03.221000', '2016-06-23 10:15:01.600000', '2016-06-23 10:30:01.751000', '2016-06-23 10:45:01.262000', '2016-06-23 11:00:01.942000', '2016-06-23 11:15:01.619000', '2016-06-23 11:30:01.574000', '2016-06-23 11:45:01.471000', '2016-06-23 12:00:01.638000', '2016-06-23 12:15:01.490000', '2016-06-23 12:30:01.296000', '2016-06-23 12:45:01.407000', '2016-06-23 13:00:01.690000', '2016-06-23 13:15:01.665000', '2016-06-23 13:30:01.470000', '2016-06-23 13:45:00.896000', '2016-06-23 14:00:01.407000', '2016-06-23 14:15:01.305000', '2016-06-23 14:30:01.342000', '2016-06-23 14:45:01.020000', '2016-06-23 15:00:01.278000', '2016-06-23 15:15:01.257000', '2016-06-23 15:30:01.489000', '2016-06-23 15:45:01.160000', '2016-06-23 16:00:01.278000', '2016-06-23 16:15:01.228000', '2016-06-23 16:30:01.347000', '2016-06-23 16:45:01.477000', '2016-06-23 17:00:01.295000', '2016-06-23 17:15:01.093000', '2016-06-23 17:30:01.524000', '2016-06-23 17:45:01.216000', '2016-06-23 18:00:01.129000', '2016-06-23 18:15:01.251000', '2016-06-23 18:30:01.524000', '2016-06-23 18:45:01.057000', '2016-06-23 19:00:00.575000', '2016-06-23 19:15:02.286000', '2016-06-23 19:30:02.305000', '2016-06-23 19:45:01.905000', '2016-06-23 20:00:02.355000', '2016-06-23 20:15:01.615000', '2016-06-23 20:30:01.801000', '2016-06-23 20:45:01.946000', '2016-06-23 21:00:02.196000', '2016-06-23 21:15:01.927000', '2016-06-23 21:30:01.561000', '2016-06-23 21:45:01.830000', '2016-06-23 22:00:01.954000', '2016-06-23 22:15:01.548000', '2016-06-23 22:30:01.778000', '2016-06-23 22:45:01.536000', '2016-06-23 23:00:01.802000', '2016-06-23 23:15:01.827000', '2016-06-23 23:30:01.265000', '2016-06-23 23:45:01.953000', '2016-06-24 00:00:02.483000', '2016-06-24 00:15:01.594000', '2016-06-24 00:30:01.616000', '2016-06-24 00:45:01.727000', '2016-06-24 01:00:01.853000', '2016-06-24 01:15:01.645000', '2016-06-24 01:30:01.653000', '2016-06-24 01:45:01.201000', '2016-06-24 02:00:01.230000', '2016-06-24 02:15:01.400000', '2016-06-24 02:30:01.477000', '2016-06-24 02:45:01.649000', '2016-06-24 03:00:01.582000', '2016-06-24 03:15:01.481000', '2016-06-24 03:30:01.397000', '2016-06-24 03:45:01.272000', '2016-06-24 04:00:01.487000', '2016-06-24 04:15:01.429000', '2016-06-24 04:30:01.328000', '2016-06-24 04:45:01.348000', '2016-06-24 05:00:01.393000', '2016-06-24 05:15:00.969000', '2016-06-24 05:30:01.529000', '2016-06-24 05:45:00.857000', '2016-06-24 06:00:01.117000', '2016-06-24 06:15:01.230000', '2016-06-24 06:30:01.378000', '2016-06-24 06:45:00.877000', '2016-06-24 07:00:01.310000', '2016-06-24 07:15:01.167000']
y = ['29.99', '30', '30', '29.99', '30', '30.02', '30.02', '30.03', '30.04', '30.05', '30.06', '30.06', '30.06', '30.05', '30.05', '30.05', '30.05', '30.05', '30.05', '30.05', '30.04', '30.04', '30.04', '30.04', '30.04', '30.04', '30.04', '30.04', '30.04', '30.03', '30.03', '30.03', '30.03', '30.03', '30.03', '30.03', '30.04', '30.04', '30.04', '30.04', '30.04', '30.04', '30.04', '30.04', '30.05', '30.05', '30.05', '30.05', '30.05', '30.04', '30.04', '30.05', '30.05', '30.05', '30.04', '30.04', '30.04', '30.04', '30.04', '30.04', '30.04', '30.04', '30.04', '30.03', '30.03', '30.02', '30.02', '30.01', '30.01', '30.01', '30', '29.99', '29.99', '29.98', '29.98', '29.97', '29.97', '29.96', '29.96', '29.96', '29.95', '29.94', '29.94', '29.94', '29.93', '29.92', '29.92', '29.92', '29.92', '29.92', '29.92', '29.92', '29.92', '29.93', '29.93', '29.93', '29.93', '29.93', '29.93', '29.94', '29.94', '29.94', '29.94', '29.94', '29.94', '29.94', '29.94', '29.94', '29.95', '29.95', '29.95', '29.95', '29.94', '29.94', '29.94', '29.94', '29.93', '29.92', '29.9', '29.9', '29.91', '29.93', '29.95', '29.95', '29.96', '29.95', '29.94', '29.94', '29.96', '29.96', '29.96', '29.95', '29.95', '29.99', '29.99', '29.97', '29.97', '30', '29.99', '29.99', '29.99', '29.98', '29.92', '29.9', '29.9', '29.89', '29.91', '29.91', '29.91', '29.92', '29.92', '29.92', '29.92', '29.96', '29.99', '30.04', '30.04', '30.02', '29.89', '29.89', '29.89', '29.89', '29.91', '29.9', '29.91', '29.91', '29.91', '29.89', '29.89', '29.89', '29.89', '29.89', '29.88', '29.88', '29.88', '29.87', '29.87', '29.86', '29.86', '29.86', '29.84', '29.83', '29.83', '29.82', '29.82', '29.8', '29.8', '29.78', '29.76', '29.77', '29.77', '29.75', '29.74', '29.74', '29.73', '29.73', '29.76', '29.83', '29.82', '29.82', '29.79', '29.78', '29.76', '29.76', '29.76', '29.78', '29.77', '29.77', '29.78', '29.78', '29.78', '29.78', '29.78', '29.75', '29.77', '29.77', '29.77', '29.77', '29.78', '29.79', '29.79', '29.79', '29.79', '29.79', '29.79', '29.8', '29.8', '29.8', '29.8', '29.81', '29.81', '29.81', '29.82', '29.82', '29.83', '29.83', '29.84', '29.84', '29.85', '29.85', '29.86', '29.87', '29.87', '29.87', '29.87', '29.87', '29.87', '29.88', '29.88', '29.88', '29.88', '29.88', '29.89', '29.89', '29.89', '29.89', '29.89', '29.89', '29.89', '29.89', '29.89', '29.89', '29.89', '29.9', '29.9', '29.9', '29.9', '29.9', '29.89', '29.89', '29.89', '29.89', '29.89', '29.89', '29.9', '29.89', '29.89', '29.89', '29.89', '29.9', '29.9', '29.9', '29.9', '29.92', '29.92', '29.92', '29.92', '29.92', '29.94', '29.94', '29.94', '29.95', '29.95', '29.96', '29.96', '29.97', '29.97', '29.98', '29.98', '29.98', '29.99', '29.99', '29.99', '30.0', '30.0', '30.0', '30.0', '30.0', '30.0', '30.0', '30.0', '30.0', '30.0', '29.99', '29.99', '29.99', '29.99', '29.99', '29.99', '29.99', '30.01', '30.01', '30.02', '30.02', '30.03', '30.03', '30.04', '30.04', '30.04']
list_of_dates = [dt.datetime.strptime(obs, '%Y-%m-%d %H:%M:%S.%f') for obs in x]
dates_to_plot = mdate.date2num(list_of_dates)
fig1 = plt.figure(1, figsize=(7, 3))
ax = fig1.add_subplot(111)
ax.plot(dates_to_plot, y)
ax.xaxis.set_major_formatter(mdate.DateFormatter('%a'))
plt.show()
But when I change ax.plot to ax.bar, Matplotlib throws an error saying:
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/matplotlib/transforms.py:745:
TypeError: unsupported operand type(s) for +: 'int' and 'str'
I realize that converting the y obs to floats will clear the error, I'm just curious why (all else equal) ax.plot can handle the data as strings but ax.bar can not.
EDIT: This question applies to what would now be considered very old and outdated versions of Matplotlib and Python.

Generate gridview dynamically with headers in metro application using C# and XAML

There is no fixed number of columns. It will come from web service dynamically. How to design and bind gridview this way.
Try Following Way:
Dim sb As New StringBuilder
sb.Append("<DataTemplate xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">")
sb.Append("<StackPanel Orientation=""Horizontal"">")
sb.Append("<Grid>")
sb.Append("<Grid.ColumnDefinitions>")
sb.Append("<ColumnDefinition Width=""auto""></ColumnDefinition>")
sb.Append("<ColumnDefinition Width=""auto""></ColumnDefinition>")
sb.Append("<ColumnDefinition Width=""auto""></ColumnDefinition>")
sb.Append("<ColumnDefinition Width=""auto""></ColumnDefinition>")
sb.Append("<ColumnDefinition Width=""auto""></ColumnDefinition>")
sb.Append("<ColumnDefinition Width=""auto""></ColumnDefinition>")
sb.Append("<ColumnDefinition Width=""auto""></ColumnDefinition>")
sb.Append("<ColumnDefinition Width=""auto""></ColumnDefinition>")
sb.Append("<ColumnDefinition Width=""auto""></ColumnDefinition>")
sb.Append("<ColumnDefinition Width=""auto""></ColumnDefinition>")
sb.Append("<ColumnDefinition Width=""auto""></ColumnDefinition>")
sb.Append("<ColumnDefinition Width=""auto""></ColumnDefinition>")
sb.Append("<ColumnDefinition Width=""auto""></ColumnDefinition>")
sb.Append("</Grid.ColumnDefinitions>")
sb.Append("<Grid.RowDefinitions>")
sb.Append("<RowDefinition Height=""50""></RowDefinition>")
sb.Append("</Grid.RowDefinitions>")
sb.Append("<Border Grid.Column=""0"" BorderThickness=""1,0,1,0"" BorderBrush=""White"">")
sb.Append(" <Button x:Name=""imgEdit"" Grid.Column=""0"" HorizontalAlignment=""Center"" VerticalAlignment=""Center"" Height=""30"" Width=""37"" Click=""EditInventory"" >")
sb.Append("<Button.Background>")
sb.Append("<ImageBrush Stretch=""Fill"" ImageSource=""{Binding pencil}"" ></ImageBrush>")
sb.Append("</Button.Background>")
sb.Append("</Button>")
sb.Append("</Border>")
sb.Append("<Border Grid.Column=""1"" BorderThickness=""1,0,1,0"" BorderBrush=""White"" >")
sb.Append("<TextBlock x:Name=""lblSrNo"" Text=""{Binding serial}"" FontSize=""15"" Grid.Column=""1"" Foreground=""{Binding RForeColor}"" FontFamily=""arial"" HorizontalAlignment=""Center"" VerticalAlignment=""Center"" Width=""35"" TextAlignment=""Right"" Padding=""1,0,2,0""></TextBlock>")
sb.Append("</Border>")
sb.Append("<Border Grid.Column=""2"" BorderThickness=""1,0,1,0"" BorderBrush=""White"" >")
sb.Append("<TextBlock x:Name=""lblDescription"" Text=""{Binding a3}"" Loaded=""lblDesc_Loaded"" Width=""365"" FontSize=""15"" TextWrapping=""Wrap"" Grid.Column=""2"" Grid.Row=""0"" Foreground=""{Binding RForeColor}"" FontFamily=""arial"" HorizontalAlignment=""Center"" VerticalAlignment=""Center"" Padding=""2,0,1,0""></TextBlock>")
sb.Append("</Border>")
sb.Append("<Border Grid.Column=""3"" Loaded=""SizeBorderDispaly"" BorderThickness=""1,0,1,0"" BorderBrush=""White"" >")
sb.Append("<TextBlock x:Name=""lblSize"" Loaded=""SizeDispaly"" TextWrapping=""Wrap"" Text=""{Binding size}"" Width=""90"" FontSize=""15"" Grid.Column=""3"" Foreground=""{Binding RForeColor}"" FontFamily=""arial"" HorizontalAlignment=""Right"" VerticalAlignment=""Center"" Padding=""2,0,1,0""></TextBlock>")
sb.Append("</Border>")
sb.Append("<Border Grid.Column=""4"" Loaded=""DepartmentBorderDisplay"" Visibility=""Collapsed"" BorderThickness=""1,0,1,0"" BorderBrush=""White"" >")
sb.Append("<TextBlock x:Name=""lblDepartment"" Visibility=""Collapsed"" Loaded=""DepartmentDisplay"" TextWrapping=""Wrap"" Text=""{Binding dept_desc}"" Width=""90"" FontSize=""15"" Grid.Column=""4"" Foreground=""{Binding RForeColor}"" FontFamily=""arial"" HorizontalAlignment=""Center"" VerticalAlignment=""Center"" Padding=""2,0,1,0""></TextBlock>")
sb.Append("</Border>")
sb.Append("<Border Grid.Column=""5"" BorderThickness=""1,0,1,0"" BorderBrush=""White"">")
sb.Append("<TextBox x:Name=""txtQty"" TextAlignment=""Right"" Text=""{Binding a5, Mode=TwoWay}"" GotFocus=""txtQty_GotFocus"" LostFocus=""txtQty_LostFocus"" Width=""30"" FontSize=""15"" Grid.Column=""5"" Height=""30"" Foreground=""Black"" FontFamily=""arial"" HorizontalAlignment=""Center"" VerticalAlignment=""Center"" InputScope=""Number""></TextBox>")
sb.Append("</Border>")
sb.Append("<Border Grid.Column=""6"" BorderThickness=""1,0,1,0"" BorderBrush=""White"" >")
sb.Append("<TextBlock x:Name=""txtPrice"" TextAlignment=""Right"" Text=""{Binding a6, Mode=TwoWay}"" Loaded=""lblDecimalValue_Loaded"" Width=""80"" FontSize=""15"" Grid.Column=""6"" Foreground=""{Binding RForeColor}"" FontFamily=""arial"" HorizontalAlignment=""Center"" VerticalAlignment=""Center"" Padding=""1,0,2,0""></TextBlock>")
sb.Append("</Border>")
sb.Append("<Border Grid.Column=""7"" BorderThickness=""1,0,1,0"" BorderBrush=""White"" >")
sb.Append("<TextBlock x:Name=""lblDisc"" TextAlignment=""Right"" Text=""{Binding a7}"" Width=""70"" FontSize=""15"" Grid.Column=""7"" Loaded=""lblDecimalValue_Loaded"" Foreground=""{Binding RForeColor}"" FontFamily=""arial"" HorizontalAlignment=""Center"" VerticalAlignment=""Center"" Padding=""1,0,2,0""></TextBlock>")
sb.Append("</Border>")
sb.Append("<Border Grid.Column=""8"" BorderThickness=""1,0,1,0"" BorderBrush=""White"">")
sb.Append("<TextBlock x:Name=""lblP"" Text=""{Binding Qty}"" Width=""25"" FontSize=""15"" Grid.Column=""8"" Foreground=""{Binding RForeColor}"" FontFamily=""arial"" HorizontalAlignment=""Center"" VerticalAlignment=""Center"" TextAlignment=""Center""></TextBlock>")
sb.Append("</Border>")
sb.Append("<Border Grid.Column=""9"" BorderThickness=""1,0,1,0"" BorderBrush=""White"" >")
sb.Append("<TextBlock Width=""100"" TextAlignment=""Right"" Text=""{Binding a11,Mode=TwoWay}"" x:Name=""lblExt"" FontSize=""15"" Loaded=""lblDecimalValue_Loaded"" Grid.Column=""9"" Foreground=""{Binding RForeColor}"" FontFamily=""arial"" HorizontalAlignment=""Center"" VerticalAlignment=""Center"" Padding=""1,0,2,0""></TextBlock>")
sb.Append("</Border>")
sb.Append("<Border Grid.Column=""10"" Loaded=""lblBorderPts_Loaded"" BorderThickness=""1,0,1,0"" BorderBrush=""White"" >")
sb.Append("<TextBlock Width=""70"" TextAlignment=""Right"" x:Name=""lblPts"" Loaded=""lblPts_Loaded"" FontSize=""15"" Grid.Column=""10"" Text=""{Binding points}"" Foreground=""{Binding RForeColor}"" FontFamily=""arial"" HorizontalAlignment=""Center"" VerticalAlignment=""Center"" Padding=""1,0,2,0""></TextBlock>")
sb.Append("</Border>")
sb.Append("<Border Grid.Column=""11"" BorderThickness=""1,0,1,0"" BorderBrush=""White"">")
sb.Append("<Button x:Name=""imgDelete"" Width=""37"" FontSize=""17"" Grid.Column=""11"" HorizontalAlignment=""Center"" VerticalAlignment=""Center"" Height=""30"" Click=""btnDelete_Click_1"">")
sb.Append("<Button.Background>")
sb.Append("<ImageBrush Stretch=""Fill"" ImageSource=""{Binding delete}""></ImageBrush>")
sb.Append("</Button.Background>")
sb.Append("</Button>")
sb.Append("</Border>")
sb.Append("</Grid>")
sb.Append("</StackPanel>")
sb.Append("</DataTemplate>")
Dim datatemplate As New DataTemplate
datatemplate = TryCast(XamlReader.Load(sb.ToString()), DataTemplate)
grdCustomer.ItemTemplate = datatemplate