- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a working program and now I'm working out the details and I came across an issue with the labeling of one of my axis. I'm have data that runs between 10,000 to 800,000 and I was wondering if I would be able to label my Y-axis in scientific notation instead of linear. I could use $AFLOG, or $AFLOG10 but that is not right. I would like for it be like 1.0E4 or something around that order. Is it possible to get it like that?
This is a quickwin aplication.
[fortran]
retcode=GetGraphDefaults($GTXY,graph)
graph.graphColor=$CIBRIGHTWHITE
graph.graphBgColor=$CIBLACK!$CIBRIGHTWHITE!$CIBROWN
graph.setGraphMode=.False.
graph.x2=wc.numxpixels-1
graph.y2=wc.numypixels-1
graph.title='Intensity Vs. Bin #' !Main Title of Graph
graph.title2= filename
! retcode=GetDataDefaults(graph,numPoints2,H1,dSettings) !testing H1(10)
retcode=GetDataDefaults(graph,numPoints,array,dSettings)
dSettings.markerType = $MKNONE
dSettings.lineType = $LTSOLID
dSettings.lineColor = $CIYELLOW
retcode=GetAxisDefaults(graph,dSettings,$ATX,$AFLINEAR,axis(1))
axis(1).title='Bin #'
axis(1).axisPos=$APBOTTOM!$APTOP
axis(1).tickType=$TTINSIDE
axis(1).tickColor=$CILIGHTRED
axis(1).minorTickColor=$CIRED
axis(1).gridStyle=$GSNONE
!axis(1).gridLineType = $LTNONE
retcode=GetAxisDefaults(graph,dSettings,$ATY,$AFLINEAR,axis(2))
axis(2).title='Intensity'
axis(2).tickType=$TTINSIDE
axis(2).tickColor=$CILIGHTRED
axis(2).minorTickColor=$CIRED
axis(2).gridStyle=$GSNONE
!axis(2).gridLineType = $LTNONE
retcode=PlotGraph(graph,2,axis,1)
! retcode=PlotData(graph,H1,dSettings,axis(1),axis(2)) !testing H1(10)
retcode=PlotData(graph,array,dSettings,axis(1),axis(2))
status = GETWSIZEQQ(10, QWIN$SIZECURR, winfo)
[/fortran]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have all the sources to Scigraph - you can tweak it in any way you want. From a brief perusal of the sources, I would suggest looking at line 420 of SGPLOT.f90 which, I think, converts the axis value to a numeric string. You could replace the F10. with EN10, or something like that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Steve for your suggesting, I made the changes and it worked great. The only issue that I did come accros was that I wasn't able to change it to EN10 for some reason. I keeped getting a rountime-error when ever I used EN or ES but I was able to change it to E which made it better. Thanks again.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page