How to add an editor for one element of location or rotation_euler
Use the index property of the prop layout.

import bpy

class LayoutPanel(bpy.types.Panel):
    bl_label = "Panel with funny layout"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOL_PROPS"

    def draw(self, context):
        layout = self.layout
        cube = bpy.context.scene.objects.get("Cube")
        if cube:
            layout.prop(cube, "location", index=0)
            layout.prop(cube, "rotation_euler", index=0)

bpy.utils.register_class(LayoutPanel)