RE: How do I plot a circle? HgTX (Civil/Environmental) 5 Dec 05 17:56īecause my chart is not a graph: it is a diagram. How do I have my code appear in a snappy little subwindow like Panars used above? Please attack it with gusto: I want it to end up as bullet-proof as possible. ' Return presence/absence of axes back to the way it was. ' Keep plot size as is, but adjust the appropriate scale. ' (3) Record its extreme values and then lock the scale. ' (1) Turn it on if it is not already on ' However no engineer would allow such a graph on a spreadsheet.ĭim HaveXaxis As Boolean, HaveYaxis As Boolean ' overlaps with the actual axis, in that it sometimes moves things around ' Macro seems to have intermittent difficulties if an axis title ' h ttp://pelt m/Excel/Ch arts/Squar eGrid.html ' Subsequent modifications made to accommodate plots without axes. Electricpete then made an improvement in that forum. ' Grabbed from Eng-Tips' "Spreadsheets" forum, where it was placed ' Note that the chart has to be "active" when the macro is run. ' the right amount to result in equal X and Y scales. ![]() ' Changes the scale of an Excel graph along one of its two axes by exactly What is the purpose of the follwoing code?Įng-tips forums: The best place on the web for engineering discussions. One macro and the spreadsheet is auto-scaled with 1:1 aspect ratio. I thought it would be useful to add code at the beginning of the function that let excel auto-update the graph scales before running the rest of the function. Some of your data might be outsie the range for example. If you try to use the function a second time on different data, it doesn't exactly work. One downside of the function as written is that it turns off auto-scaling. ![]() That is a feature I need for plotting vectors. Axes(xlValue).MaximumScale = plotInHt * GridSz / Xpix + Ymin Axes(xlCategory).MaximumScale = plotInWd * GridSz / Ypix + Xmin ' Keep plot size as is, adjust max scales Dim plotInHt As Integer, plotInWd As Integerĭim Ymax As Double, Ymin As Double, Ydel As Doubleĭim Xmax As Double, Xmin As Double, Xdel As Doubleĭim Ypix As Double, Xpix As Double, GridSz As Double
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |