Solved
New Contributor
Posts: 4

# Step Plot /Chart/ Graph with Nominal attributes on Y axis

Dear Community,

While trying to compute some step chart, I came across to the code listed below found in the SAS help documentation.

```title "Stock Trend for IBM";
proc sgplot data=sashelp.stocks
(where=(date >= "01jan2004"d and stock = "IBM"));
step x=date y=close;
run;```

The hand's drawing is the plot I would like to compute: the challenge appears to the visual aspect as the attribute on the y-axis will be ranked by order/ severity ascendant.

S

Accepted Solutions
Solution
‎08-03-2016 06:21 PM
Super User
Posts: 13,523

## Re: Step Plot /Chart/ Graph with Nominal attributes on Y axis

It may be time to clarify the question. Do you have a dataset you want to plot? If so, what does the data look like. You can follow instructions from this link: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... to make datastep code that can be pasted here for the variables of interest.

Or are you trying to get values from an existing graph?

All Replies
Super User
Posts: 13,523

## Re: Step Plot /Chart/ Graph with Nominal attributes on Y axis

You may be looking for the annotate feature to draw lines at points decided by values in the data. BUT you will have to provide the code on how to select a point and then draw the horizontal and vertical unless you want the lines at each corner.

If you only want your values of interest then you would suppress the default axis statements and supply your values which might be easiest with the annotate.

New Contributor
Posts: 4

## Re: Step Plot /Chart/ Graph with Nominal attributes on Y axis

Thanks ballardw, actually the lines are not required @ each corner. the dashes were to reference them from the other axis. However I wou
New Contributor
Posts: 4

## Re: Step Plot /Chart/ Graph with Nominal attributes on Y axis

Sorry I would be interested in the annotation.
Did you mean renaming them ?
Thanks
Solution
‎08-03-2016 06:21 PM
Super User
Posts: 13,523

## Re: Step Plot /Chart/ Graph with Nominal attributes on Y axis

It may be time to clarify the question. Do you have a dataset you want to plot? If so, what does the data look like. You can follow instructions from this link: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... to make datastep code that can be pasted here for the variables of interest.

Or are you trying to get values from an existing graph?

New Contributor
Posts: 4

## Re: Step Plot /Chart/ Graph with Nominal attributes on Y axis

Thanks ballardw, actually was trying to convert the numerical values from y-axis to categorical for visualization purpose. I used the 'proc format' to solve it. Many Thaanks
☑ This topic is solved.