	program magics

	call popen

	call pset1c("output_formats", (/"png"/), 1)
	call psetc("output_name", "graph2")
	call psetc("output_name_first_page_number", "off")

	call psetr("subpage_y_min", 25.00)
	call psetc("subpage_x_date_max", "2012-03-03 12:00:00")
	call psetc("subpage_map_projection", "cartesian")
	call psetr("subpage_y_position", 2.00)
	call psetr("subpage_y_max", 75.00)
	call psetc("subpage_x_axis_type", "date")
	call psetc("subpage_y_axis_type", "regular")
	call psetc("subpage_x_date_min", "2012-03-01 12:00:00")

	call psetr("axis_tick_label_height", 0.40)
	call psetc("axis_orientation", "vertical")
	call pseti("axis_grid_thickness", 1)
	call psetc("axis_tick_label_colour", "navy")
	call psetc("axis_type", "regular")
	call psetc("axis_grid", "on")
	call psetc("axis_grid_line_style", "dot")
	call psetc("axis_grid_colour", "grey")
	call paxis

	call preset('axis_tick_label_height')
	call preset('axis_orientation')
	call preset('axis_grid_thickness')
	call preset('axis_tick_label_colour')
	call preset('axis_type')
	call preset('axis_grid')
	call preset('axis_grid_line_style')
	call preset('axis_grid_colour')

	call psetc("axis_orientation", "horizontal")
	call pseti("axis_grid_thickness", 1)
	call psetc("axis_type", "date")
	call psetr("axis_days_label_height", 0.40)
	call psetc("axis_grid", "on")
	call psetr("axis_months_label_height", 0.40)
	call psetr("axis_years_label_height", 0.50)
	call psetc("axis_grid_line_style", "dot")
	call psetc("axis_grid_colour", "grey")
	call paxis

	call preset('axis_orientation')
	call preset('axis_grid_thickness')
	call preset('axis_type')
	call preset('axis_days_label_height')
	call preset('axis_grid')
	call preset('axis_months_label_height')
	call preset('axis_years_label_height')
	call preset('axis_grid_line_style')
	call preset('axis_grid_colour')

	call psetr("graph_bar_width", 7200.00)
	call psetc("graph_type", "bar")
	call pset1c("graph_curve_date_x_values", (/"2012-03-02 00:00:00", "2012-03-02 12:00:00", "2012-03-03 00:00:00"/), 3)
	call pset1r("graph_bar_y_upper_values", (/50.00, 30.00, 50.00/), 3)
	call psetc("graph_bar_colour", "evergreen")
	call pgraph

	call preset('graph_bar_width')
	call preset('graph_type')
	call preset('graph_curve_date_x_values')
	call preset('graph_bar_y_upper_values')
	call preset('graph_bar_colour')

	call pset1c("text_lines", (/"Simple Bar"/), 1)
	call psetr("text_font_size", 1.00)
	call psetc("text_justification", "left")
	call psetc("text_colour", "charcoal")
	call ptext

	call preset('text_lines')
	call preset('text_font_size')
	call preset('text_justification')
	call preset('text_colour')

	call pclose

	end
