	program magics

	call popen

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

	call psetr("subpage_y_min", 25.00)
	call psetc("subpage_x_date_max", "2012-03-07 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-03 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 psetc("graph_bar_colour", "red")
	call pset1c("graph_curve_date_x_values", (/"2012-03-04 00:00:00", "2012-03-04 12:00:00", "2012-03-05 00:00:00"/), 3)
	call psetc("graph_bar_style", "linebar")
	call psetc("graph_bar_line_colour", "red")
	call psetc("legend_user_text", "<font size='0.5' colour='red'> Using linebar style  </font>")
	call pset1r("graph_bar_y_upper_values", (/30.00, 35.00, 50.00/), 3)
	call psetc("graph_bar_justification", "right")
	call pset1r("graph_bar_y_lower_values", (/60.00, 40.00, 70.00/), 3)
	call psetr("graph_bar_width", 21600.00)
	call psetc("graph_type", "bar")
	call pseti("graph_bar_line_thickness", 4)
	call psetc("legend", "on")
	call pgraph

	call preset('graph_bar_colour')
	call preset('graph_curve_date_x_values')
	call preset('graph_bar_style')
	call preset('graph_bar_line_colour')
	call preset('legend_user_text')
	call preset('graph_bar_y_upper_values')
	call preset('graph_bar_justification')
	call preset('graph_bar_y_lower_values')
	call preset('graph_bar_width')
	call preset('graph_type')
	call preset('graph_bar_line_thickness')
	call preset('legend')

	call psetc("graph_bar_colour", "green")
	call pset1c("graph_curve_date_x_values", (/"2012-03-06 00:00:00", "2012-03-06 12:00:00", "2012-03-07 00:00:00"/), 3)
	call psetc("legend_user_text", "<font size='0.5' colour='evergreen'> Using annotations </font>")
	call pset1c("graph_bar_annotation", (/"<font colour='red'>red result</font>        ", "result                                      ",&
		"<font colour='evergreen'>green result</font>"/), 3)
	call psetc("graph_bar_annotation_font_colour", "charcoal")
	call pset1r("graph_bar_y_upper_values", (/60.00, 40.00, 30.00/), 3)
	call psetc("graph_bar_justification", "centre")
	call pset1r("graph_bar_y_lower_values", (/0.00, 0.00, 0.00/), 3)
	call psetr("graph_bar_width", 10800.00)
	call psetc("graph_type", "bar")
	call psetr("graph_bar_annotation_font_size", 0.50)
	call psetc("legend", "on")
	call pgraph

	call preset('graph_bar_colour')
	call preset('graph_curve_date_x_values')
	call preset('legend_user_text')
	call preset('graph_bar_annotation')
	call preset('graph_bar_annotation_font_colour')
	call preset('graph_bar_y_upper_values')
	call preset('graph_bar_justification')
	call preset('graph_bar_y_lower_values')
	call preset('graph_bar_width')
	call preset('graph_type')
	call preset('graph_bar_annotation_font_size')
	call preset('legend')

	call pset1c("text_lines", (/"More options on bar plotting ..."/), 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
