BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
acordes
Rhodochrosite | Level 12

I want SGPLOT to hide the values on the xaxis, but it suppresses the observations and the graph becomes incorrect.

Commenting out the xaxis line draws the correct graph but makes the values not readable. 

 

nok.pngok.png

 

ods graphics on / imagemap;
proc sgplot data=public.have;
format CUOMENCI euro9.1; 
    series x=CUOMENCI y=density / tip=(CUOMENCI);
	vbarbasic CUOMENCI / response=_freq_ stat=mean y2axis transparency=0.5 dataskin=pressed ;
xaxis values=(0 to 40 by 2.5);
run;

 

 

data PUBLIC.HAVE;
  infile datalines dsd truncover;
  input KDEId:32. Dim:32. NPerDimGridPoints:32. CUOMENCI:32. Min:32. Max:32. Bandwidth:32. Density:32. n:32. _freq_:32.;
datalines4;
3,1,96,0,0,39.91,1.2060680283,0.3826774425,1,605952
3,1,96,0.4201052632,0,39.91,1.2060680283,0.3601522389,2,0
3,1,96,0.8402105263,0,39.91,1.2060680283,0.3002243323,3,0
3,1,96,1.2603157895,0,39.91,1.2060680283,0.22167268,4,0
3,1,96,1.6804210526,0,39.91,1.2060680283,0.1449722883,5,0
3,1,96,2.1005263158,0,39.91,1.2060680283,0.0839778049,6,0
3,1,96,2.5206315789,0,39.91,1.2060680283,0.0430875656,7,0
3,1,96,2.9407368421,0,39.91,1.2060680283,0.0195819652,8,0
3,1,96,3.3608421053,0,39.91,1.2060680283,0.0078839501,9,0
3,1,96,3.7809473684,0,39.91,1.2060680283,0.0028151913,10,0
3,1,96,4.2010526316,0,39.91,1.2060680283,0.0008990898,11,0
3,1,96,4.6211578947,0,39.91,1.2060680283,0.0002725968,12,0
3,1,96,5.0412631579,0,39.91,1.2060680283,0.0001071157,13,0
3,1,96,5.4613684211,0,39.91,1.2060680283,0.0000900181,14,0
3,1,96,5.8814736842,0,39.91,1.2060680283,0.0001182113,15,0
3,1,96,6.3015789474,0,39.91,1.2060680283,0.000159098,16,0
3,1,96,6.7216842105,0,39.91,1.2060680283,0.0002016782,17,211
3,1,96,7.1417894737,0,39.91,1.2060680283,0.0002476211,18,0
3,1,96,7.5618947368,0,39.91,1.2060680283,0.0003213283,19,118
3,1,96,7.982,0,39.91,1.2060680283,0.0004958598,20,0
3,1,96,8.4021052632,0,39.91,1.2060680283,0.0009382976,21,0
3,1,96,8.8222105263,0,39.91,1.2060680283,0.0019713588,22,151
3,1,96,9.2423157895,0,39.91,1.2060680283,0.0041254791,23,0
3,1,96,9.6624210526,0,39.91,1.2060680283,0.0081265474,24,8
3,1,96,10.082526316,0,39.91,1.2060680283,0.0147555813,25,2
3,1,96,10.502631579,0,39.91,1.2060680283,0.0245565204,26,124
3,1,96,10.922736842,0,39.91,1.2060680283,0.0374574807,27,476
3,1,96,11.342842105,0,39.91,1.2060680283,0.0524671457,28,11093
3,1,96,11.762947368,0,39.91,1.2060680283,0.0676479023,29,32465
3,1,96,12.183052632,0,39.91,1.2060680283,0.0805006925,30,6953
3,1,96,12.603157895,0,39.91,1.2060680283,0.0887120941,31,72921
3,1,96,13.023263158,0,39.91,1.2060680283,0.0909736954,32,11285
3,1,96,13.443368421,0,39.91,1.2060680283,0.087447619,33,289
3,1,96,13.863473684,0,39.91,1.2060680283,0.0795902228,34,20720
3,1,96,14.283578947,0,39.91,1.2060680283,0.0694342982,35,9902
3,1,96,14.703684211,0,39.91,1.2060680283,0.058779076,36,21103
3,1,96,15.123789474,0,39.91,1.2060680283,0.048744256,37,1074
3,1,96,15.543894737,0,39.91,1.2060680283,0.0398170105,38,16950
3,1,96,15.964,0,39.91,1.2060680283,0.0321661876,39,1073
3,1,96,16.384105263,0,39.91,1.2060680283,0.0258957234,40,727
3,1,96,16.804210526,0,39.91,1.2060680283,0.0210741355,41,182
3,1,96,17.224315789,0,39.91,1.2060680283,0.0176161376,42,93
3,1,96,17.644421053,0,39.91,1.2060680283,0.015206513,43,12191
3,1,96,18.064526316,0,39.91,1.2060680283,0.0133827766,44,91
3,1,96,18.484631579,0,39.91,1.2060680283,0.0117280518,45,3260
3,1,96,18.904736842,0,39.91,1.2060680283,0.0100287368,46,229
3,1,96,19.324842105,0,39.91,1.2060680283,0.0082979933,47,1841
3,1,96,19.744947368,0,39.91,1.2060680283,0.0066852694,48,150
3,1,96,20.165052632,0,39.91,1.2060680283,0.0053614694,49,1571
3,1,96,20.585157895,0,39.91,1.2060680283,0.0044460434,50,2
3,1,96,21.005263158,0,39.91,1.2060680283,0.0039814671,51,294
3,1,96,21.425368421,0,39.91,1.2060680283,0.0039301195,52,27
3,1,96,21.845473684,0,39.91,1.2060680283,0.0041803149,53,1071
3,1,96,22.265578947,0,39.91,1.2060680283,0.0045690503,54,2473
3,1,96,22.685684211,0,39.91,1.2060680283,0.0049293348,55,561
3,1,96,23.105789474,0,39.91,1.2060680283,0.0051503404,56,2293
3,1,96,23.525894737,0,39.91,1.2060680283,0.0052206086,57,1123
3,1,96,23.946,0,39.91,1.2060680283,0.0052270158,58,151
3,1,96,24.366105263,0,39.91,1.2060680283,0.0053053182,59,259
3,1,96,24.786210526,0,39.91,1.2060680283,0.0055650642,60,1418
3,1,96,25.206315789,0,39.91,1.2060680283,0.0060245091,61,2014
3,1,96,25.626421053,0,39.91,1.2060680283,0.0065855846,62,109
3,1,96,26.046526316,0,39.91,1.2060680283,0.0070625328,63,1920
3,1,96,26.466631579,0,39.91,1.2060680283,0.0072565559,64,5724
3,1,96,26.886736842,0,39.91,1.2060680283,0.0070450699,65,16
3,1,96,27.306842105,0,39.91,1.2060680283,0.0064389519,66,1448
3,1,96,27.726947368,0,39.91,1.2060680283,0.0055736596,67,47
3,1,96,28.147052632,0,39.91,1.2060680283,0.004641621,68,1430
3,1,96,28.567157895,0,39.91,1.2060680283,0.0038126359,69,98
3,1,96,28.987263158,0,39.91,1.2060680283,0.0031902521,70,817
3,1,96,29.407368421,0,39.91,1.2060680283,0.0028151936,71,643
3,1,96,29.827473684,0,39.91,1.2060680283,0.0026888558,72,6
3,1,96,30.247578947,0,39.91,1.2060680283,0.0027849024,73,2
3,1,96,30.667684211,0,39.91,1.2060680283,0.0030437642,74,557
3,1,96,31.087789474,0,39.91,1.2060680283,0.003371822,75,752
3,1,96,31.507894737,0,39.91,1.2060680283,0.003665219,76,3384
3,1,96,31.928,0,39.91,1.2060680283,0.003849783,77,34
3,1,96,32.348105263,0,39.91,1.2060680283,0.0039055761,78,1
3,1,96,32.768210526,0,39.91,1.2060680283,0.0038553815,79,1
3,1,96,33.188315789,0,39.91,1.2060680283,0.0037312713,80,1390
3,1,96,33.608421053,0,39.91,1.2060680283,0.0035527625,81,2278
3,1,96,34.028526316,0,39.91,1.2060680283,0.0033316917,82,142
3,1,96,34.448631579,0,39.91,1.2060680283,0.0030862553,83,0
3,1,96,34.868736842,0,39.91,1.2060680283,0.0028394321,84,361
3,1,96,35.288842105,0,39.91,1.2060680283,0.0026012332,85,0
3,1,96,35.708947368,0,39.91,1.2060680283,0.0023572041,86,1891
3,1,96,36.129052632,0,39.91,1.2060680283,0.0020796191,87,326
3,1,96,36.549157895,0,39.91,1.2060680283,0.001752701,88,451
3,1,96,36.969263158,0,39.91,1.2060680283,0.00138921,89,2
3,1,96,37.389368421,0,39.91,1.2060680283,0.0010257304,90,96
3,1,96,37.809473684,0,39.91,1.2060680283,0.0007033586,91,0
3,1,96,38.229578947,0,39.91,1.2060680283,0.0004494628,92,11
3,1,96,38.649684211,0,39.91,1.2060680283,0.0002706672,93,3
3,1,96,39.069789474,0,39.91,1.2060680283,0.0001568549,94,6
3,1,96,39.489894737,0,39.91,1.2060680283,0.0000901162,95,29
3,1,96,39.91,0,39.91,1.2060680283,0.0000527768,96,7442
;;;;
1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
Add this option in your code:

xaxis values=(0 to 40 by 2.5) type=linear;

View solution in original post

1 REPLY 1
Ksharp
Super User
Add this option in your code:

xaxis values=(0 to 40 by 2.5) type=linear;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 581 views
  • 0 likes
  • 2 in conversation