Control what properties displayed in F-Curve Editor
From the wiki manual:


  Header Tools
  
  Show Selected Only  
  
  
  By default, the Graph Editor shows the channels for the active object only. Toggle this button off to show channels for all objects.   
  
  
  Show Hidden  
  
  
  Enable this to show channels from objects/bones that are hidden. 
  
  
  Show only matching F-Curves  
  
  
  Use this to only include F-Curves that contain the specified text.  
  
  
  Filters  
  
  
  Show options for whether channels related to certain types of data are included.
  




If you want to change these settings you should have a look at


bpy.types.SpaceGraphEditor
bpy.types.DopeSheet
bpy.types.FCurve


If you are using an operator which will be called from the graph editor, the space data is available from

space = context.space_data
dopesheet = space.dopesheet


I.e.:

dopesheet.show_only_selected = True
#select the objects you want to show
obj.select = True


Another example:

#show only objects from the group named 'Group'
dopesheet.filter_group = bpy.data.groups['Group']
dopesheet.show_only_group_objects = True

#don't show object transformations and scene properties
dopesheet.show_transforms = False
dopesheet.show_scenes = False


Hide a fcurve:

#only accessible by index
fcurve = obj.animation_data.action.fcurves[0].hide = True
#fcurve's attributes data_path, array_index provide more information about it


or select it:

fcurve = obj.animation_data.action.fcurves[0].select = True


If the object has not been animated:

The minimum requirement to show up in the graph curve is existent animation data with an action assigned to it which possesses at least one fcurve.

So if the object has not been animated yet:

if not obj.animation_data:
    obj.animation_data_create()
    obj.animation_data.action = bpy.data.actions.new('myAction')
    #create an fcurve for the x coordinate
    obj.animation_data.action.fcurves.new("location, 0)