# How to perform the equivalent of ytics() with new graphics

0

I want to set up Y, such as ytics(0,80,10,0), how to do it in blow code?

```load aou nou t;

baka=100;
x = t[1:baka];
y = aou[1:baka,.]/30;

/* Graphics  */

//Declare the structure
struct plotControl myPlot;

//Initialize the structure
myplot = plotGetDefaults("xy");

//Set new line colors
clrs = "green"\$|"red"\$|"midnight blue";
plotSetLineColor(&myPlot, clrs);

//Set line style
newStyle = 1*ones(2,1);
plotSetLineStyle(&myPlot, newStyle);

plotSetXLabel(&myPlot, "Time", "English111 Vivace BT", 30, "black");
plotSetYLabel(&myPlot, "Environmental fluctuation", "Century New", 25, "black");
plotSetXTicInterval(&myPlot,baka/5, 0);
plotSetGrid(&myPlot, "off");
plotSetLegend(&myPlot,"off");

plotxy(myplot,x,y);

end;
```

0

Use the scalePlot1 procedure from this link right after your call to plotXY, like this:

```plotXY(myPlot, x, y);

//Make Y-axis range from 0 to 80
scalePlot1(minc(x)|minc(x), 0|80);

end;
```

The scalePlot1 procedure takes a 2x1 vector for the minimum and maximum of X and a 2x1 vector for the minimum and maximum of Y. Since we do not wish to expand the X axis in this case and scalePlot1 does not contract the axes (it will only expand them), we can pass in any values that are in the range of your X data. Here we arbitrarily choose the minimum values of X.

For the Y-axis, we pass in the 2x1 vector with 0 as the first element and 80 as the second. This will make sure that the Y-axis will range from 0 to 80 even if your Y data does not extend that far.

NOTE: scalePlot1 will apply changes to an already created graph, so it must be called after the main plot call as shown in this example.

0

this only give us the min and max Y, how to control the step and minor subdivisions. Like we can do with ytics()?

0

Use the scalePlot1 procedure from this link right after your call to plotXY, like this:

```plotXY(myPlot, x, y);

//Make Y-axis range from 0 to 80
scalePlot1(minc(x)|minc(x), 0|80);

end;
```

The scalePlot1 procedure takes a 2x1 vector for the minimum and maximum of X and a 2x1 vector for the minimum and maximum of Y. Since we do not wish to expand the X axis in this case and scalePlot1 does not contract the axes (it will only expand them), we can pass in any values that are in the range of your X data. Here we arbitrarily choose the minimum values of X.

For the Y-axis, we pass in the 2x1 vector with 0 as the first element and 80 as the second. This will make sure that the Y-axis will range from 0 to 80 even if your Y data does not extend that far.

NOTE: scalePlot1 will apply changes to an already created graph, so it must be called after the main plot call as shown in this example.

0

this only give us the min and max Y, how to control the step and minor subdivisions. Like we can do with ytics()?

• ### Aptech Systems, Inc. Worldwide Headquarters

Aptech Systems, Inc.
2350 East Germann Road, Suite #21
Chandler, AZ 85286

Phone: 360.886.7100
FAX: 360.886.8922

• ### Training & Events

Want more guidance while learning about the full functionality of GAUSS and its capabilities? Get in touch for in-person training or browse additional references below.

• ### Tutorials

Step-by-step, informative lessons for those who want to dive into GAUSS and achieve their goals, fast.

• ### Want to find out more?

Get a real answer from a real person

• ### Have a Specific Question?

Get a real answer from a real person

• Need Support?
• ### Support Plans

Premier Support and Platinum Premier Support are annually renewable membership programs that provide you with important benefits including technical support, product maintenance, and substantial cost-saving features for your GAUSS System or the GAUSS Engine.

• ### User Forums

Join our community to see why our users are considered some of the most active and helpful in the industry!