QwtPlot.3 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564
  1. .TH "QwtPlot" 3 "Mon Dec 28 2020" "Version 6.1.6" "Qwt User's Guide" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. QwtPlot \- A 2-D plotting widget\&.
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .PP
  10. \fC#include <qwt_plot\&.h>\fP
  11. .PP
  12. Inherits QFrame, and \fBQwtPlotDict\fP\&.
  13. .SS "Public Types"
  14. .in +1c
  15. .ti -1c
  16. .RI "enum \fBAxis\fP { \fByLeft\fP, \fByRight\fP, \fBxBottom\fP, \fBxTop\fP, \fBaxisCnt\fP }"
  17. .br
  18. .RI "Axis index\&. "
  19. .ti -1c
  20. .RI "enum \fBLegendPosition\fP { \fBLeftLegend\fP, \fBRightLegend\fP, \fBBottomLegend\fP, \fBTopLegend\fP }"
  21. .br
  22. .in -1c
  23. .SS "Public Slots"
  24. .in +1c
  25. .ti -1c
  26. .RI "virtual void \fBreplot\fP ()"
  27. .br
  28. .RI "Redraw the plot\&. "
  29. .ti -1c
  30. .RI "void \fBautoRefresh\fP ()"
  31. .br
  32. .RI "Replots the plot if \fBautoReplot()\fP is \fCtrue\fP\&. "
  33. .in -1c
  34. .SS "Signals"
  35. .in +1c
  36. .ti -1c
  37. .RI "void \fBitemAttached\fP (\fBQwtPlotItem\fP *plotItem, bool on)"
  38. .br
  39. .ti -1c
  40. .RI "void \fBlegendDataChanged\fP (const QVariant &itemInfo, const QList< \fBQwtLegendData\fP > &data)"
  41. .br
  42. .in -1c
  43. .SS "Public Member Functions"
  44. .in +1c
  45. .ti -1c
  46. .RI "\fBQwtPlot\fP (QWidget *=NULL)"
  47. .br
  48. .RI "Constructor\&. "
  49. .ti -1c
  50. .RI "\fBQwtPlot\fP (const \fBQwtText\fP &\fBtitle\fP, QWidget *=NULL)"
  51. .br
  52. .RI "Constructor\&. "
  53. .ti -1c
  54. .RI "virtual \fB~QwtPlot\fP ()"
  55. .br
  56. .RI "Destructor\&. "
  57. .ti -1c
  58. .RI "void \fBapplyProperties\fP (const QString &)"
  59. .br
  60. .ti -1c
  61. .RI "QString \fBgrabProperties\fP () const"
  62. .br
  63. .ti -1c
  64. .RI "void \fBsetAutoReplot\fP (bool=true)"
  65. .br
  66. .RI "Set or reset the autoReplot option\&. "
  67. .ti -1c
  68. .RI "bool \fBautoReplot\fP () const"
  69. .br
  70. .ti -1c
  71. .RI "void \fBsetPlotLayout\fP (\fBQwtPlotLayout\fP *)"
  72. .br
  73. .RI "Assign a new plot layout\&. "
  74. .ti -1c
  75. .RI "\fBQwtPlotLayout\fP * \fBplotLayout\fP ()"
  76. .br
  77. .ti -1c
  78. .RI "const \fBQwtPlotLayout\fP * \fBplotLayout\fP () const"
  79. .br
  80. .ti -1c
  81. .RI "void \fBsetTitle\fP (const QString &)"
  82. .br
  83. .ti -1c
  84. .RI "void \fBsetTitle\fP (const \fBQwtText\fP &)"
  85. .br
  86. .ti -1c
  87. .RI "\fBQwtText\fP \fBtitle\fP () const"
  88. .br
  89. .ti -1c
  90. .RI "\fBQwtTextLabel\fP * \fBtitleLabel\fP ()"
  91. .br
  92. .ti -1c
  93. .RI "const \fBQwtTextLabel\fP * \fBtitleLabel\fP () const"
  94. .br
  95. .ti -1c
  96. .RI "void \fBsetFooter\fP (const QString &)"
  97. .br
  98. .ti -1c
  99. .RI "void \fBsetFooter\fP (const \fBQwtText\fP &)"
  100. .br
  101. .ti -1c
  102. .RI "\fBQwtText\fP \fBfooter\fP () const"
  103. .br
  104. .ti -1c
  105. .RI "\fBQwtTextLabel\fP * \fBfooterLabel\fP ()"
  106. .br
  107. .ti -1c
  108. .RI "const \fBQwtTextLabel\fP * \fBfooterLabel\fP () const"
  109. .br
  110. .ti -1c
  111. .RI "void \fBsetCanvas\fP (QWidget *)"
  112. .br
  113. .RI "Set the drawing canvas of the plot widget\&. "
  114. .ti -1c
  115. .RI "QWidget * \fBcanvas\fP ()"
  116. .br
  117. .ti -1c
  118. .RI "const QWidget * \fBcanvas\fP () const"
  119. .br
  120. .ti -1c
  121. .RI "void \fBsetCanvasBackground\fP (const QBrush &)"
  122. .br
  123. .RI "Change the background of the plotting area\&. "
  124. .ti -1c
  125. .RI "QBrush \fBcanvasBackground\fP () const"
  126. .br
  127. .ti -1c
  128. .RI "virtual \fBQwtScaleMap\fP \fBcanvasMap\fP (int axisId) const"
  129. .br
  130. .ti -1c
  131. .RI "double \fBinvTransform\fP (int axisId, int pos) const"
  132. .br
  133. .ti -1c
  134. .RI "double \fBtransform\fP (int axisId, double value) const"
  135. .br
  136. .RI "Transform a value into a coordinate in the plotting region\&. "
  137. .ti -1c
  138. .RI "\fBQwtScaleEngine\fP * \fBaxisScaleEngine\fP (int axisId)"
  139. .br
  140. .ti -1c
  141. .RI "const \fBQwtScaleEngine\fP * \fBaxisScaleEngine\fP (int axisId) const"
  142. .br
  143. .ti -1c
  144. .RI "void \fBsetAxisScaleEngine\fP (int axisId, \fBQwtScaleEngine\fP *)"
  145. .br
  146. .ti -1c
  147. .RI "void \fBsetAxisAutoScale\fP (int axisId, bool on=true)"
  148. .br
  149. .RI "Enable autoscaling for a specified axis\&. "
  150. .ti -1c
  151. .RI "bool \fBaxisAutoScale\fP (int axisId) const"
  152. .br
  153. .ti -1c
  154. .RI "void \fBenableAxis\fP (int axisId, bool tf=true)"
  155. .br
  156. .RI "Enable or disable a specified axis\&. "
  157. .ti -1c
  158. .RI "bool \fBaxisEnabled\fP (int axisId) const"
  159. .br
  160. .ti -1c
  161. .RI "void \fBsetAxisFont\fP (int axisId, const QFont &)"
  162. .br
  163. .RI "Change the font of an axis\&. "
  164. .ti -1c
  165. .RI "QFont \fBaxisFont\fP (int axisId) const"
  166. .br
  167. .ti -1c
  168. .RI "void \fBsetAxisScale\fP (int axisId, double min, double max, double stepSize=0)"
  169. .br
  170. .RI "Disable autoscaling and specify a fixed scale for a selected axis\&. "
  171. .ti -1c
  172. .RI "void \fBsetAxisScaleDiv\fP (int axisId, const \fBQwtScaleDiv\fP &)"
  173. .br
  174. .RI "Disable autoscaling and specify a fixed scale for a selected axis\&. "
  175. .ti -1c
  176. .RI "void \fBsetAxisScaleDraw\fP (int axisId, \fBQwtScaleDraw\fP *)"
  177. .br
  178. .RI "Set a scale draw\&. "
  179. .ti -1c
  180. .RI "double \fBaxisStepSize\fP (int axisId) const"
  181. .br
  182. .RI "Return the step size parameter that has been set in setAxisScale\&. "
  183. .ti -1c
  184. .RI "\fBQwtInterval\fP \fBaxisInterval\fP (int axisId) const"
  185. .br
  186. .RI "Return the current interval of the specified axis\&. "
  187. .ti -1c
  188. .RI "const \fBQwtScaleDiv\fP & \fBaxisScaleDiv\fP (int axisId) const"
  189. .br
  190. .RI "Return the scale division of a specified axis\&. "
  191. .ti -1c
  192. .RI "const \fBQwtScaleDraw\fP * \fBaxisScaleDraw\fP (int axisId) const"
  193. .br
  194. .RI "Return the scale draw of a specified axis\&. "
  195. .ti -1c
  196. .RI "\fBQwtScaleDraw\fP * \fBaxisScaleDraw\fP (int axisId)"
  197. .br
  198. .RI "Return the scale draw of a specified axis\&. "
  199. .ti -1c
  200. .RI "const \fBQwtScaleWidget\fP * \fBaxisWidget\fP (int axisId) const"
  201. .br
  202. .ti -1c
  203. .RI "\fBQwtScaleWidget\fP * \fBaxisWidget\fP (int axisId)"
  204. .br
  205. .ti -1c
  206. .RI "void \fBsetAxisLabelAlignment\fP (int axisId, Qt::Alignment)"
  207. .br
  208. .ti -1c
  209. .RI "void \fBsetAxisLabelRotation\fP (int axisId, double rotation)"
  210. .br
  211. .ti -1c
  212. .RI "void \fBsetAxisTitle\fP (int axisId, const QString &)"
  213. .br
  214. .RI "Change the title of a specified axis\&. "
  215. .ti -1c
  216. .RI "void \fBsetAxisTitle\fP (int axisId, const \fBQwtText\fP &)"
  217. .br
  218. .RI "Change the title of a specified axis\&. "
  219. .ti -1c
  220. .RI "\fBQwtText\fP \fBaxisTitle\fP (int axisId) const"
  221. .br
  222. .ti -1c
  223. .RI "void \fBsetAxisMaxMinor\fP (int axisId, int maxMinor)"
  224. .br
  225. .ti -1c
  226. .RI "int \fBaxisMaxMinor\fP (int axisId) const"
  227. .br
  228. .ti -1c
  229. .RI "void \fBsetAxisMaxMajor\fP (int axisId, int maxMajor)"
  230. .br
  231. .ti -1c
  232. .RI "int \fBaxisMaxMajor\fP (int axisId) const"
  233. .br
  234. .ti -1c
  235. .RI "void \fBinsertLegend\fP (\fBQwtAbstractLegend\fP *, \fBLegendPosition\fP=\fBQwtPlot::RightLegend\fP, double ratio=\-1\&.0)"
  236. .br
  237. .RI "Insert a legend\&. "
  238. .ti -1c
  239. .RI "\fBQwtAbstractLegend\fP * \fBlegend\fP ()"
  240. .br
  241. .ti -1c
  242. .RI "const \fBQwtAbstractLegend\fP * \fBlegend\fP () const"
  243. .br
  244. .ti -1c
  245. .RI "void \fBupdateLegend\fP ()"
  246. .br
  247. .ti -1c
  248. .RI "void \fBupdateLegend\fP (const \fBQwtPlotItem\fP *)"
  249. .br
  250. .ti -1c
  251. .RI "virtual QSize \fBsizeHint\fP () const"
  252. .br
  253. .ti -1c
  254. .RI "virtual QSize \fBminimumSizeHint\fP () const"
  255. .br
  256. .RI "Return a minimum size hint\&. "
  257. .ti -1c
  258. .RI "virtual void \fBupdateLayout\fP ()"
  259. .br
  260. .RI "Adjust plot content to its current size\&. "
  261. .ti -1c
  262. .RI "virtual void \fBdrawCanvas\fP (QPainter *)"
  263. .br
  264. .ti -1c
  265. .RI "void \fBupdateAxes\fP ()"
  266. .br
  267. .RI "Rebuild the axes scales\&. "
  268. .ti -1c
  269. .RI "void \fBupdateCanvasMargins\fP ()"
  270. .br
  271. .RI "Update the canvas margins\&. "
  272. .ti -1c
  273. .RI "virtual void \fBgetCanvasMarginsHint\fP (const \fBQwtScaleMap\fP maps[], const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const"
  274. .br
  275. .RI "Calculate the canvas margins\&. "
  276. .ti -1c
  277. .RI "virtual bool \fBevent\fP (QEvent *)"
  278. .br
  279. .RI "Adds handling of layout requests\&. "
  280. .ti -1c
  281. .RI "virtual bool \fBeventFilter\fP (QObject *, QEvent *)"
  282. .br
  283. .RI "Event filter\&. "
  284. .ti -1c
  285. .RI "virtual void \fBdrawItems\fP (QPainter *, const QRectF &, const \fBQwtScaleMap\fP maps[\fBaxisCnt\fP]) const"
  286. .br
  287. .ti -1c
  288. .RI "virtual QVariant \fBitemToInfo\fP (\fBQwtPlotItem\fP *) const"
  289. .br
  290. .RI "Build an information, that can be used to identify a plot item on the legend\&. "
  291. .ti -1c
  292. .RI "virtual \fBQwtPlotItem\fP * \fBinfoToItem\fP (const QVariant &) const"
  293. .br
  294. .RI "Identify the plot item according to an item info object, that has bee generated from \fBitemToInfo()\fP\&. "
  295. .in -1c
  296. .SS "Protected Member Functions"
  297. .in +1c
  298. .ti -1c
  299. .RI "virtual void \fBresizeEvent\fP (QResizeEvent *e)"
  300. .br
  301. .in -1c
  302. .SS "Static Protected Member Functions"
  303. .in +1c
  304. .ti -1c
  305. .RI "static bool \fBaxisValid\fP (int axisId)"
  306. .br
  307. .in -1c
  308. .SH "Detailed Description"
  309. .PP
  310. A 2-D plotting widget\&.
  311. \fBQwtPlot\fP is a widget for plotting two-dimensional graphs\&. An unlimited number of plot items can be displayed on its canvas\&. Plot items might be curves (\fBQwtPlotCurve\fP), markers (\fBQwtPlotMarker\fP), the grid (\fBQwtPlotGrid\fP), or anything else derived from \fBQwtPlotItem\fP\&. A plot can have up to four axes, with each plot item attached to an x- and a y axis\&. The scales at the axes can be explicitly set (\fBQwtScaleDiv\fP), or are calculated from the plot items, using algorithms (\fBQwtScaleEngine\fP) which can be configured separately for each axis\&.
  312. .PP
  313. The simpleplot example is a good starting point to see how to set up a plot widget\&.
  314. .PP
  315. .PP
  316. \fBExample\fP
  317. .RS 4
  318. The following example shows (schematically) the most simple way to use \fBQwtPlot\fP\&. By default, only the left and bottom axes are visible and their scales are computed automatically\&.
  319. .PP
  320. .nf
  321. #include <qwt_plot\&.h>
  322. #include <qwt_plot_curve\&.h>
  323. QwtPlot *myPlot = new QwtPlot( "Two Curves", parent );
  324. // add curves
  325. QwtPlotCurve *curve1 = new QwtPlotCurve( "Curve 1" );
  326. QwtPlotCurve *curve2 = new QwtPlotCurve( "Curve 2" );
  327. // connect or copy the data to the curves
  328. curve1->setData( \&.\&.\&. );
  329. curve2->setData( \&.\&.\&. );
  330. curve1->attach( myPlot );
  331. curve2->attach( myPlot );
  332. // finally, refresh the plot
  333. myPlot->replot();
  334. .fi
  335. .PP
  336. \\endpar
  337. .RE
  338. .PP
  339. .SH "Member Enumeration Documentation"
  340. .PP
  341. .SS "enum \fBQwtPlot::Axis\fP"
  342. .PP
  343. Axis index\&.
  344. .PP
  345. \fBEnumerator\fP
  346. .in +1c
  347. .TP
  348. \fB\fIyLeft \fP\fP
  349. Y axis left of the canvas\&.
  350. .TP
  351. \fB\fIyRight \fP\fP
  352. Y axis right of the canvas\&.
  353. .TP
  354. \fB\fIxBottom \fP\fP
  355. X axis below the canvas\&.
  356. .TP
  357. \fB\fIxTop \fP\fP
  358. X axis above the canvas\&.
  359. .TP
  360. \fB\fIaxisCnt \fP\fP
  361. Number of axes\&.
  362. .SS "enum \fBQwtPlot::LegendPosition\fP"
  363. Position of the legend, relative to the canvas\&.
  364. .PP
  365. \fBSee also\fP
  366. .RS 4
  367. \fBinsertLegend()\fP
  368. .RE
  369. .PP
  370. .PP
  371. \fBEnumerator\fP
  372. .in +1c
  373. .TP
  374. \fB\fILeftLegend \fP\fP
  375. The legend will be left from the \fBQwtPlot::yLeft\fP axis\&.
  376. .TP
  377. \fB\fIRightLegend \fP\fP
  378. The legend will be right from the \fBQwtPlot::yRight\fP axis\&.
  379. .TP
  380. \fB\fIBottomLegend \fP\fP
  381. The legend will be below the footer\&.
  382. .TP
  383. \fB\fITopLegend \fP\fP
  384. The legend will be above the title\&.
  385. .SH "Constructor & Destructor Documentation"
  386. .PP
  387. .SS "QwtPlot::QwtPlot (QWidget * parent = \fCNULL\fP)\fC [explicit]\fP"
  388. .PP
  389. Constructor\&.
  390. .PP
  391. \fBParameters\fP
  392. .RS 4
  393. \fIparent\fP Parent widget
  394. .RE
  395. .PP
  396. .SS "QwtPlot::QwtPlot (const \fBQwtText\fP & title, QWidget * parent = \fCNULL\fP)\fC [explicit]\fP"
  397. .PP
  398. Constructor\&.
  399. .PP
  400. \fBParameters\fP
  401. .RS 4
  402. \fItitle\fP Title text
  403. .br
  404. \fIparent\fP Parent widget
  405. .RE
  406. .PP
  407. .SH "Member Function Documentation"
  408. .PP
  409. .SS "void QwtPlot::applyProperties (const QString &)"
  410. This method is intended for manipulating the plot widget from a specific editor in the Qwt designer plugin\&.
  411. .PP
  412. \fBWarning\fP
  413. .RS 4
  414. The plot editor has never been implemented\&.
  415. .RE
  416. .PP
  417. .SS "bool QwtPlot::autoReplot () const"
  418. .PP
  419. \fBReturns\fP
  420. .RS 4
  421. true if the autoReplot option is set\&.
  422. .RE
  423. .PP
  424. \fBSee also\fP
  425. .RS 4
  426. \fBsetAutoReplot()\fP
  427. .RE
  428. .PP
  429. .SS "bool QwtPlot::axisAutoScale (int axisId) const"
  430. .PP
  431. \fBReturns\fP
  432. .RS 4
  433. \fCTrue\fP, if autoscaling is enabled
  434. .RE
  435. .PP
  436. \fBParameters\fP
  437. .RS 4
  438. \fIaxisId\fP Axis index
  439. .RE
  440. .PP
  441. .SS "bool QwtPlot::axisEnabled (int axisId) const"
  442. .PP
  443. \fBReturns\fP
  444. .RS 4
  445. \fCTrue\fP, if a specified axis is enabled
  446. .RE
  447. .PP
  448. \fBParameters\fP
  449. .RS 4
  450. \fIaxisId\fP Axis index
  451. .RE
  452. .PP
  453. .SS "QFont QwtPlot::axisFont (int axisId) const"
  454. .PP
  455. \fBReturns\fP
  456. .RS 4
  457. The font of the scale labels for a specified axis
  458. .RE
  459. .PP
  460. \fBParameters\fP
  461. .RS 4
  462. \fIaxisId\fP Axis index
  463. .RE
  464. .PP
  465. .SS "\fBQwtInterval\fP QwtPlot::axisInterval (int axisId) const"
  466. .PP
  467. Return the current interval of the specified axis\&. This is only a convenience function for axisScaleDiv( axisId )->interval();
  468. .PP
  469. \fBParameters\fP
  470. .RS 4
  471. \fIaxisId\fP Axis index
  472. .RE
  473. .PP
  474. \fBReturns\fP
  475. .RS 4
  476. Scale interval
  477. .RE
  478. .PP
  479. \fBSee also\fP
  480. .RS 4
  481. \fBQwtScaleDiv\fP, \fBaxisScaleDiv()\fP
  482. .RE
  483. .PP
  484. .SS "int QwtPlot::axisMaxMajor (int axisId) const"
  485. .PP
  486. \fBReturns\fP
  487. .RS 4
  488. The maximum number of major ticks for a specified axis
  489. .RE
  490. .PP
  491. \fBParameters\fP
  492. .RS 4
  493. \fIaxisId\fP Axis index
  494. .RE
  495. .PP
  496. \fBSee also\fP
  497. .RS 4
  498. \fBsetAxisMaxMajor()\fP, \fBQwtScaleEngine::divideScale()\fP
  499. .RE
  500. .PP
  501. .SS "int QwtPlot::axisMaxMinor (int axisId) const"
  502. .PP
  503. \fBReturns\fP
  504. .RS 4
  505. the maximum number of minor ticks for a specified axis
  506. .RE
  507. .PP
  508. \fBParameters\fP
  509. .RS 4
  510. \fIaxisId\fP Axis index
  511. .RE
  512. .PP
  513. \fBSee also\fP
  514. .RS 4
  515. \fBsetAxisMaxMinor()\fP, \fBQwtScaleEngine::divideScale()\fP
  516. .RE
  517. .PP
  518. .SS "const \fBQwtScaleDiv\fP & QwtPlot::axisScaleDiv (int axisId) const"
  519. .PP
  520. Return the scale division of a specified axis\&. axisScaleDiv(axisId)\&.lowerBound(), axisScaleDiv(axisId)\&.upperBound() are the current limits of the axis scale\&.
  521. .PP
  522. \fBParameters\fP
  523. .RS 4
  524. \fIaxisId\fP Axis index
  525. .RE
  526. .PP
  527. \fBReturns\fP
  528. .RS 4
  529. Scale division
  530. .RE
  531. .PP
  532. \fBSee also\fP
  533. .RS 4
  534. \fBQwtScaleDiv\fP, \fBsetAxisScaleDiv()\fP, \fBQwtScaleEngine::divideScale()\fP
  535. .RE
  536. .PP
  537. .SS "\fBQwtScaleDraw\fP * QwtPlot::axisScaleDraw (int axisId)"
  538. .PP
  539. Return the scale draw of a specified axis\&.
  540. .PP
  541. \fBParameters\fP
  542. .RS 4
  543. \fIaxisId\fP Axis index
  544. .RE
  545. .PP
  546. \fBReturns\fP
  547. .RS 4
  548. Specified scaleDraw for axis, or NULL if axis is invalid\&.
  549. .RE
  550. .PP
  551. .SS "const \fBQwtScaleDraw\fP * QwtPlot::axisScaleDraw (int axisId) const"
  552. .PP
  553. Return the scale draw of a specified axis\&.
  554. .PP
  555. \fBParameters\fP
  556. .RS 4
  557. \fIaxisId\fP Axis index
  558. .RE
  559. .PP
  560. \fBReturns\fP
  561. .RS 4
  562. Specified scaleDraw for axis, or NULL if axis is invalid\&.
  563. .RE
  564. .PP
  565. .SS "\fBQwtScaleEngine\fP * QwtPlot::axisScaleEngine (int axisId)"
  566. .PP
  567. \fBParameters\fP
  568. .RS 4
  569. \fIaxisId\fP Axis index
  570. .RE
  571. .PP
  572. \fBReturns\fP
  573. .RS 4
  574. Scale engine for a specific axis
  575. .RE
  576. .PP
  577. .SS "const \fBQwtScaleEngine\fP * QwtPlot::axisScaleEngine (int axisId) const"
  578. .PP
  579. \fBParameters\fP
  580. .RS 4
  581. \fIaxisId\fP Axis index
  582. .RE
  583. .PP
  584. \fBReturns\fP
  585. .RS 4
  586. Scale engine for a specific axis
  587. .RE
  588. .PP
  589. .SS "double QwtPlot::axisStepSize (int axisId) const"
  590. .PP
  591. Return the step size parameter that has been set in setAxisScale\&. This doesn't need to be the step size of the current scale\&.
  592. .PP
  593. \fBParameters\fP
  594. .RS 4
  595. \fIaxisId\fP Axis index
  596. .RE
  597. .PP
  598. \fBReturns\fP
  599. .RS 4
  600. step size parameter value
  601. .RE
  602. .PP
  603. \fBSee also\fP
  604. .RS 4
  605. \fBsetAxisScale()\fP, \fBQwtScaleEngine::divideScale()\fP
  606. .RE
  607. .PP
  608. .SS "\fBQwtText\fP QwtPlot::axisTitle (int axisId) const"
  609. .PP
  610. \fBReturns\fP
  611. .RS 4
  612. Title of a specified axis
  613. .RE
  614. .PP
  615. \fBParameters\fP
  616. .RS 4
  617. \fIaxisId\fP Axis index
  618. .RE
  619. .PP
  620. .SS "bool QwtPlot::axisValid (int axisId)\fC [static]\fP, \fC [protected]\fP"
  621. .PP
  622. \fBReturns\fP
  623. .RS 4
  624. \fCtrue\fP if the specified axis exists, otherwise \fCfalse\fP
  625. .RE
  626. .PP
  627. \fBParameters\fP
  628. .RS 4
  629. \fIaxisId\fP axis index
  630. .RE
  631. .PP
  632. .SS "\fBQwtScaleWidget\fP * QwtPlot::axisWidget (int axisId)"
  633. .PP
  634. \fBReturns\fP
  635. .RS 4
  636. Scale widget of the specified axis, or NULL if axisId is invalid\&.
  637. .RE
  638. .PP
  639. \fBParameters\fP
  640. .RS 4
  641. \fIaxisId\fP Axis index
  642. .RE
  643. .PP
  644. .SS "const \fBQwtScaleWidget\fP * QwtPlot::axisWidget (int axisId) const"
  645. .PP
  646. \fBReturns\fP
  647. .RS 4
  648. Scale widget of the specified axis, or NULL if axisId is invalid\&.
  649. .RE
  650. .PP
  651. \fBParameters\fP
  652. .RS 4
  653. \fIaxisId\fP Axis index
  654. .RE
  655. .PP
  656. .SS "QWidget * QwtPlot::canvas ()"
  657. .PP
  658. \fBReturns\fP
  659. .RS 4
  660. the plot's canvas
  661. .RE
  662. .PP
  663. .SS "const QWidget * QwtPlot::canvas () const"
  664. .PP
  665. \fBReturns\fP
  666. .RS 4
  667. the plot's canvas
  668. .RE
  669. .PP
  670. .SS "QBrush QwtPlot::canvasBackground () const"
  671. Nothing else than: \fBcanvas()\fP->palette()\&.brush( QPalette::Normal, QPalette::Window);
  672. .PP
  673. \fBReturns\fP
  674. .RS 4
  675. Background brush of the plotting area\&.
  676. .RE
  677. .PP
  678. \fBSee also\fP
  679. .RS 4
  680. \fBsetCanvasBackground()\fP
  681. .RE
  682. .PP
  683. .SS "\fBQwtScaleMap\fP QwtPlot::canvasMap (int axisId) const\fC [virtual]\fP"
  684. .PP
  685. \fBParameters\fP
  686. .RS 4
  687. \fIaxisId\fP Axis
  688. .RE
  689. .PP
  690. \fBReturns\fP
  691. .RS 4
  692. Map for the axis on the canvas\&. With this map pixel coordinates can translated to plot coordinates and vice versa\&.
  693. .RE
  694. .PP
  695. \fBSee also\fP
  696. .RS 4
  697. \fBQwtScaleMap\fP, \fBtransform()\fP, \fBinvTransform()\fP
  698. .RE
  699. .PP
  700. .SS "void QwtPlot::drawCanvas (QPainter * painter)\fC [virtual]\fP"
  701. Redraw the canvas\&.
  702. .PP
  703. \fBParameters\fP
  704. .RS 4
  705. \fIpainter\fP Painter used for drawing
  706. .RE
  707. .PP
  708. \fBWarning\fP
  709. .RS 4
  710. drawCanvas calls drawItems what is also used for printing\&. Applications that like to add individual plot items better overload \fBdrawItems()\fP
  711. .RE
  712. .PP
  713. \fBSee also\fP
  714. .RS 4
  715. \fBdrawItems()\fP
  716. .RE
  717. .PP
  718. .SS "void QwtPlot::drawItems (QPainter * painter, const QRectF & canvasRect, const \fBQwtScaleMap\fP maps[axisCnt]) const\fC [virtual]\fP"
  719. Redraw the canvas items\&.
  720. .PP
  721. \fBParameters\fP
  722. .RS 4
  723. \fIpainter\fP Painter used for drawing
  724. .br
  725. \fIcanvasRect\fP Bounding rectangle where to paint
  726. .br
  727. \fImaps\fP \fBQwtPlot::axisCnt\fP maps, mapping between plot and paint device coordinates
  728. .RE
  729. .PP
  730. \fBNote\fP
  731. .RS 4
  732. Usually canvasRect is contentsRect() of the plot canvas\&. Due to a bug in Qt this rectangle might be wrong for certain frame styles ( f\&.e QFrame::Box ) and it might be necessary to fix the margins manually using QWidget::setContentsMargins()
  733. .RE
  734. .PP
  735. .SS "void QwtPlot::enableAxis (int axisId, bool tf = \fCtrue\fP)"
  736. .PP
  737. Enable or disable a specified axis\&. When an axis is disabled, this only means that it is not visible on the screen\&. Curves, markers and can be attached to disabled axes, and transformation of screen coordinates into values works as normal\&.
  738. .PP
  739. Only xBottom and yLeft are enabled by default\&.
  740. .PP
  741. \fBParameters\fP
  742. .RS 4
  743. \fIaxisId\fP Axis index
  744. .br
  745. \fItf\fP \fCtrue\fP (enabled) or \fCfalse\fP (disabled)
  746. .RE
  747. .PP
  748. .SS "bool QwtPlot::event (QEvent * event)\fC [virtual]\fP"
  749. .PP
  750. Adds handling of layout requests\&.
  751. .PP
  752. \fBParameters\fP
  753. .RS 4
  754. \fIevent\fP Event
  755. .RE
  756. .PP
  757. \fBReturns\fP
  758. .RS 4
  759. See QFrame::event()
  760. .RE
  761. .PP
  762. .SS "bool QwtPlot::eventFilter (QObject * object, QEvent * event)\fC [virtual]\fP"
  763. .PP
  764. Event filter\&. The plot handles the following events for the canvas:
  765. .PP
  766. .IP "\(bu" 2
  767. QEvent::Resize The canvas margins might depend on its size
  768. .IP "\(bu" 2
  769. QEvent::ContentsRectChange The layout needs to be recalculated
  770. .PP
  771. .PP
  772. \fBParameters\fP
  773. .RS 4
  774. \fIobject\fP Object to be filtered
  775. .br
  776. \fIevent\fP Event
  777. .RE
  778. .PP
  779. \fBReturns\fP
  780. .RS 4
  781. See QFrame::eventFilter()
  782. .RE
  783. .PP
  784. \fBSee also\fP
  785. .RS 4
  786. \fBupdateCanvasMargins()\fP, \fBupdateLayout()\fP
  787. .RE
  788. .PP
  789. .SS "\fBQwtText\fP QwtPlot::footer () const"
  790. .PP
  791. \fBReturns\fP
  792. .RS 4
  793. Text of the footer
  794. .RE
  795. .PP
  796. .SS "\fBQwtTextLabel\fP * QwtPlot::footerLabel ()"
  797. .PP
  798. \fBReturns\fP
  799. .RS 4
  800. Footer label widget\&.
  801. .RE
  802. .PP
  803. .SS "const \fBQwtTextLabel\fP * QwtPlot::footerLabel () const"
  804. .PP
  805. \fBReturns\fP
  806. .RS 4
  807. Footer label widget\&.
  808. .RE
  809. .PP
  810. .SS "void QwtPlot::getCanvasMarginsHint (const \fBQwtScaleMap\fP maps[], const QRectF & canvasRect, double & left, double & top, double & right, double & bottom) const\fC [virtual]\fP"
  811. .PP
  812. Calculate the canvas margins\&.
  813. .PP
  814. \fBParameters\fP
  815. .RS 4
  816. \fImaps\fP \fBQwtPlot::axisCnt\fP maps, mapping between plot and paint device coordinates
  817. .br
  818. \fIcanvasRect\fP Bounding rectangle where to paint
  819. .br
  820. \fIleft\fP Return parameter for the left margin
  821. .br
  822. \fItop\fP Return parameter for the top margin
  823. .br
  824. \fIright\fP Return parameter for the right margin
  825. .br
  826. \fIbottom\fP Return parameter for the bottom margin
  827. .RE
  828. .PP
  829. Plot items might indicate, that they need some extra space at the borders of the canvas by the \fBQwtPlotItem::Margins\fP flag\&.
  830. .PP
  831. \fBupdateCanvasMargins()\fP, \fBQwtPlotItem::getCanvasMarginHint()\fP
  832. .SS "QString QwtPlot::grabProperties () const"
  833. This method is intended for manipulating the plot widget from a specific editor in the Qwt designer plugin\&.
  834. .PP
  835. \fBReturns\fP
  836. .RS 4
  837. QString()
  838. .RE
  839. .PP
  840. \fBWarning\fP
  841. .RS 4
  842. The plot editor has never been implemented\&.
  843. .RE
  844. .PP
  845. .SS "\fBQwtPlotItem\fP * QwtPlot::infoToItem (const QVariant & itemInfo) const\fC [virtual]\fP"
  846. .PP
  847. Identify the plot item according to an item info object, that has bee generated from \fBitemToInfo()\fP\&. The default implementation simply tries to unwrap a \fBQwtPlotItem\fP pointer:
  848. .PP
  849. .PP
  850. .nf
  851. if ( itemInfo\&.canConvert<QwtPlotItem *>() )
  852. return qvariant_cast<QwtPlotItem *>( itemInfo );
  853. .fi
  854. .PP
  855. .PP
  856. \fBParameters\fP
  857. .RS 4
  858. \fIitemInfo\fP Plot item
  859. .RE
  860. .PP
  861. \fBReturns\fP
  862. .RS 4
  863. A plot item, when successful, otherwise a NULL pointer\&.
  864. .RE
  865. .PP
  866. \fBSee also\fP
  867. .RS 4
  868. \fBitemToInfo()\fP
  869. .RE
  870. .PP
  871. .SS "void QwtPlot::insertLegend (\fBQwtAbstractLegend\fP * legend, \fBQwtPlot::LegendPosition\fP pos = \fC\fBQwtPlot::RightLegend\fP\fP, double ratio = \fC\-1\&.0\fP)"
  872. .PP
  873. Insert a legend\&. If the position legend is \fC\fBQwtPlot::LeftLegend\fP\fP or \fC\fBQwtPlot::RightLegend\fP\fP the legend will be organized in one column from top to down\&. Otherwise the legend items will be placed in a table with a best fit number of columns from left to right\&.
  874. .PP
  875. \fBinsertLegend()\fP will set the plot widget as parent for the legend\&. The legend will be deleted in the destructor of the plot or when another legend is inserted\&.
  876. .PP
  877. Legends, that are not inserted into the layout of the plot widget need to connect to the \fBlegendDataChanged()\fP signal\&. Calling \fBupdateLegend()\fP initiates this signal for an initial update\&. When the application code wants to implement its own layout this also needs to be done for rendering plots to a document ( see \fBQwtPlotRenderer\fP )\&.
  878. .PP
  879. \fBParameters\fP
  880. .RS 4
  881. \fIlegend\fP Legend
  882. .br
  883. \fIpos\fP The legend's position\&. For top/left position the number of columns will be limited to 1, otherwise it will be set to unlimited\&.
  884. .br
  885. \fIratio\fP Ratio between legend and the bounding rectangle of title, canvas and axes\&. The legend will be shrunk if it would need more space than the given ratio\&. The ratio is limited to ]0\&.0 \&.\&. 1\&.0]\&. In case of <= 0\&.0 it will be reset to the default ratio\&. The default vertical/horizontal ratio is 0\&.33/0\&.5\&.
  886. .RE
  887. .PP
  888. \fBSee also\fP
  889. .RS 4
  890. \fBlegend()\fP, \fBQwtPlotLayout::legendPosition()\fP, \fBQwtPlotLayout::setLegendPosition()\fP
  891. .RE
  892. .PP
  893. .SS "double QwtPlot::invTransform (int axisId, int pos) const"
  894. Transform the x or y coordinate of a position in the drawing region into a value\&.
  895. .PP
  896. \fBParameters\fP
  897. .RS 4
  898. \fIaxisId\fP Axis index
  899. .br
  900. \fIpos\fP position
  901. .RE
  902. .PP
  903. \fBReturns\fP
  904. .RS 4
  905. Position as axis coordinate
  906. .RE
  907. .PP
  908. \fBWarning\fP
  909. .RS 4
  910. The position can be an x or a y coordinate, depending on the specified axis\&.
  911. .RE
  912. .PP
  913. .SS "void QwtPlot::itemAttached (\fBQwtPlotItem\fP * plotItem, bool on)\fC [signal]\fP"
  914. A signal indicating, that an item has been attached/detached
  915. .PP
  916. \fBParameters\fP
  917. .RS 4
  918. \fIplotItem\fP Plot item
  919. .br
  920. \fIon\fP Attached/Detached
  921. .RE
  922. .PP
  923. .SS "QVariant QwtPlot::itemToInfo (\fBQwtPlotItem\fP * plotItem) const\fC [virtual]\fP"
  924. .PP
  925. Build an information, that can be used to identify a plot item on the legend\&. The default implementation simply wraps the plot item into a QVariant object\&. When overloading \fBitemToInfo()\fP usually \fBinfoToItem()\fP needs to reimplemeted too\&.
  926. .PP
  927. .PP
  928. .nf
  929. QVariant itemInfo;
  930. qVariantSetValue( itemInfo, plotItem );
  931. .fi
  932. .PP
  933. .PP
  934. \fBParameters\fP
  935. .RS 4
  936. \fIplotItem\fP Plot item
  937. .RE
  938. .PP
  939. \fBReturns\fP
  940. .RS 4
  941. Plot item embedded in a QVariant
  942. .RE
  943. .PP
  944. \fBSee also\fP
  945. .RS 4
  946. \fBinfoToItem()\fP
  947. .RE
  948. .PP
  949. .SS "\fBQwtAbstractLegend\fP * QwtPlot::legend ()"
  950. .PP
  951. \fBReturns\fP
  952. .RS 4
  953. the plot's legend
  954. .RE
  955. .PP
  956. \fBSee also\fP
  957. .RS 4
  958. \fBinsertLegend()\fP
  959. .RE
  960. .PP
  961. .SS "const \fBQwtAbstractLegend\fP * QwtPlot::legend () const"
  962. .PP
  963. \fBReturns\fP
  964. .RS 4
  965. the plot's legend
  966. .RE
  967. .PP
  968. \fBSee also\fP
  969. .RS 4
  970. \fBinsertLegend()\fP
  971. .RE
  972. .PP
  973. .SS "void QwtPlot::legendDataChanged (const QVariant & itemInfo, const QList< \fBQwtLegendData\fP > & data)\fC [signal]\fP"
  974. A signal with the attributes how to update the legend entries for a plot item\&.
  975. .PP
  976. \fBParameters\fP
  977. .RS 4
  978. \fIitemInfo\fP Info about a plot item, build from \fBitemToInfo()\fP
  979. .br
  980. \fIdata\fP Attributes of the entries ( usually <= 1 ) for the plot item\&.
  981. .RE
  982. .PP
  983. \fBSee also\fP
  984. .RS 4
  985. \fBitemToInfo()\fP, \fBinfoToItem()\fP, \fBQwtAbstractLegend::updateLegend()\fP
  986. .RE
  987. .PP
  988. .SS "\fBQwtPlotLayout\fP * QwtPlot::plotLayout ()"
  989. .PP
  990. \fBReturns\fP
  991. .RS 4
  992. the plot's layout
  993. .RE
  994. .PP
  995. .SS "const \fBQwtPlotLayout\fP * QwtPlot::plotLayout () const"
  996. .PP
  997. \fBReturns\fP
  998. .RS 4
  999. the plot's layout
  1000. .RE
  1001. .PP
  1002. .SS "void QwtPlot::replot ()\fC [virtual]\fP, \fC [slot]\fP"
  1003. .PP
  1004. Redraw the plot\&. If the autoReplot option is not set (which is the default) or if any curves are attached to raw data, the plot has to be refreshed explicitly in order to make changes visible\&.
  1005. .PP
  1006. \fBSee also\fP
  1007. .RS 4
  1008. \fBupdateAxes()\fP, \fBsetAutoReplot()\fP
  1009. .RE
  1010. .PP
  1011. .SS "void QwtPlot::resizeEvent (QResizeEvent * e)\fC [protected]\fP, \fC [virtual]\fP"
  1012. Resize and update internal layout
  1013. .PP
  1014. \fBParameters\fP
  1015. .RS 4
  1016. \fIe\fP Resize event
  1017. .RE
  1018. .PP
  1019. .SS "void QwtPlot::setAutoReplot (bool tf = \fCtrue\fP)"
  1020. .PP
  1021. Set or reset the autoReplot option\&. If the autoReplot option is set, the plot will be updated implicitly by manipulating member functions\&. Since this may be time-consuming, it is recommended to leave this option switched off and call \fBreplot()\fP explicitly if necessary\&.
  1022. .PP
  1023. The autoReplot option is set to false by default, which means that the user has to call \fBreplot()\fP in order to make changes visible\&.
  1024. .PP
  1025. \fBParameters\fP
  1026. .RS 4
  1027. \fItf\fP \fCtrue\fP or \fCfalse\fP\&. Defaults to \fCtrue\fP\&.
  1028. .RE
  1029. .PP
  1030. \fBSee also\fP
  1031. .RS 4
  1032. \fBreplot()\fP
  1033. .RE
  1034. .PP
  1035. .SS "void QwtPlot::setAxisAutoScale (int axisId, bool on = \fCtrue\fP)"
  1036. .PP
  1037. Enable autoscaling for a specified axis\&. This member function is used to switch back to autoscaling mode after a fixed scale has been set\&. Autoscaling is enabled by default\&.
  1038. .PP
  1039. \fBParameters\fP
  1040. .RS 4
  1041. \fIaxisId\fP Axis index
  1042. .br
  1043. \fIon\fP On/Off
  1044. .RE
  1045. .PP
  1046. \fBSee also\fP
  1047. .RS 4
  1048. \fBsetAxisScale()\fP, \fBsetAxisScaleDiv()\fP, \fBupdateAxes()\fP
  1049. .RE
  1050. .PP
  1051. \fBNote\fP
  1052. .RS 4
  1053. The autoscaling flag has no effect until \fBupdateAxes()\fP is executed ( called by \fBreplot()\fP )\&.
  1054. .RE
  1055. .PP
  1056. .SS "void QwtPlot::setAxisFont (int axisId, const QFont & font)"
  1057. .PP
  1058. Change the font of an axis\&.
  1059. .PP
  1060. \fBParameters\fP
  1061. .RS 4
  1062. \fIaxisId\fP Axis index
  1063. .br
  1064. \fIfont\fP Font
  1065. .RE
  1066. .PP
  1067. \fBWarning\fP
  1068. .RS 4
  1069. This function changes the font of the tick labels, not of the axis title\&.
  1070. .RE
  1071. .PP
  1072. .SS "void QwtPlot::setAxisLabelAlignment (int axisId, Qt::Alignment alignment)"
  1073. Change the alignment of the tick labels
  1074. .PP
  1075. \fBParameters\fP
  1076. .RS 4
  1077. \fIaxisId\fP Axis index
  1078. .br
  1079. \fIalignment\fP Or'd Qt::AlignmentFlags see <qnamespace\&.h>
  1080. .RE
  1081. .PP
  1082. \fBSee also\fP
  1083. .RS 4
  1084. \fBQwtScaleDraw::setLabelAlignment()\fP
  1085. .RE
  1086. .PP
  1087. .SS "void QwtPlot::setAxisLabelRotation (int axisId, double rotation)"
  1088. Rotate all tick labels
  1089. .PP
  1090. \fBParameters\fP
  1091. .RS 4
  1092. \fIaxisId\fP Axis index
  1093. .br
  1094. \fIrotation\fP Angle in degrees\&. When changing the label rotation, the label alignment might be adjusted too\&.
  1095. .RE
  1096. .PP
  1097. \fBSee also\fP
  1098. .RS 4
  1099. \fBQwtScaleDraw::setLabelRotation()\fP, \fBsetAxisLabelAlignment()\fP
  1100. .RE
  1101. .PP
  1102. .SS "void QwtPlot::setAxisMaxMajor (int axisId, int maxMajor)"
  1103. Set the maximum number of major scale intervals for a specified axis
  1104. .PP
  1105. \fBParameters\fP
  1106. .RS 4
  1107. \fIaxisId\fP Axis index
  1108. .br
  1109. \fImaxMajor\fP Maximum number of major steps
  1110. .RE
  1111. .PP
  1112. \fBSee also\fP
  1113. .RS 4
  1114. \fBaxisMaxMajor()\fP
  1115. .RE
  1116. .PP
  1117. .SS "void QwtPlot::setAxisMaxMinor (int axisId, int maxMinor)"
  1118. Set the maximum number of minor scale intervals for a specified axis
  1119. .PP
  1120. \fBParameters\fP
  1121. .RS 4
  1122. \fIaxisId\fP Axis index
  1123. .br
  1124. \fImaxMinor\fP Maximum number of minor steps
  1125. .RE
  1126. .PP
  1127. \fBSee also\fP
  1128. .RS 4
  1129. \fBaxisMaxMinor()\fP
  1130. .RE
  1131. .PP
  1132. .SS "void QwtPlot::setAxisScale (int axisId, double min, double max, double stepSize = \fC0\fP)"
  1133. .PP
  1134. Disable autoscaling and specify a fixed scale for a selected axis\&. In \fBupdateAxes()\fP the scale engine calculates a scale division from the specified parameters, that will be assigned to the scale widget\&. So updates of the scale widget usually happen delayed with the next replot\&.
  1135. .PP
  1136. \fBParameters\fP
  1137. .RS 4
  1138. \fIaxisId\fP Axis index
  1139. .br
  1140. \fImin\fP Minimum of the scale
  1141. .br
  1142. \fImax\fP Maximum of the scale
  1143. .br
  1144. \fIstepSize\fP Major step size\&. If \fCstep == 0\fP, the step size is calculated automatically using the maxMajor setting\&.
  1145. .RE
  1146. .PP
  1147. \fBSee also\fP
  1148. .RS 4
  1149. \fBsetAxisMaxMajor()\fP, \fBsetAxisAutoScale()\fP, \fBaxisStepSize()\fP, \fBQwtScaleEngine::divideScale()\fP
  1150. .RE
  1151. .PP
  1152. .SS "void QwtPlot::setAxisScaleDiv (int axisId, const \fBQwtScaleDiv\fP & scaleDiv)"
  1153. .PP
  1154. Disable autoscaling and specify a fixed scale for a selected axis\&. The scale division will be stored locally only until the next call of \fBupdateAxes()\fP\&. So updates of the scale widget usually happen delayed with the next replot\&.
  1155. .PP
  1156. \fBParameters\fP
  1157. .RS 4
  1158. \fIaxisId\fP Axis index
  1159. .br
  1160. \fIscaleDiv\fP Scale division
  1161. .RE
  1162. .PP
  1163. \fBSee also\fP
  1164. .RS 4
  1165. \fBsetAxisScale()\fP, \fBsetAxisAutoScale()\fP
  1166. .RE
  1167. .PP
  1168. .SS "void QwtPlot::setAxisScaleDraw (int axisId, \fBQwtScaleDraw\fP * scaleDraw)"
  1169. .PP
  1170. Set a scale draw\&.
  1171. .PP
  1172. \fBParameters\fP
  1173. .RS 4
  1174. \fIaxisId\fP Axis index
  1175. .br
  1176. \fIscaleDraw\fP Object responsible for drawing scales\&.
  1177. .RE
  1178. .PP
  1179. By passing scaleDraw it is possible to extend \fBQwtScaleDraw\fP functionality and let it take place in \fBQwtPlot\fP\&. Please note that scaleDraw has to be created with new and will be deleted by the corresponding QwtScale member ( like a child object )\&.
  1180. .PP
  1181. \fBSee also\fP
  1182. .RS 4
  1183. \fBQwtScaleDraw\fP, \fBQwtScaleWidget\fP
  1184. .RE
  1185. .PP
  1186. \fBWarning\fP
  1187. .RS 4
  1188. The attributes of scaleDraw will be overwritten by those of the previous \fBQwtScaleDraw\fP\&.
  1189. .RE
  1190. .PP
  1191. .SS "void QwtPlot::setAxisScaleEngine (int axisId, \fBQwtScaleEngine\fP * scaleEngine)"
  1192. Change the scale engine for an axis
  1193. .PP
  1194. \fBParameters\fP
  1195. .RS 4
  1196. \fIaxisId\fP Axis index
  1197. .br
  1198. \fIscaleEngine\fP Scale engine
  1199. .RE
  1200. .PP
  1201. \fBSee also\fP
  1202. .RS 4
  1203. \fBaxisScaleEngine()\fP
  1204. .RE
  1205. .PP
  1206. .SS "void QwtPlot::setAxisTitle (int axisId, const QString & title)"
  1207. .PP
  1208. Change the title of a specified axis\&.
  1209. .PP
  1210. \fBParameters\fP
  1211. .RS 4
  1212. \fIaxisId\fP Axis index
  1213. .br
  1214. \fItitle\fP axis title
  1215. .RE
  1216. .PP
  1217. .SS "void QwtPlot::setAxisTitle (int axisId, const \fBQwtText\fP & title)"
  1218. .PP
  1219. Change the title of a specified axis\&.
  1220. .PP
  1221. \fBParameters\fP
  1222. .RS 4
  1223. \fIaxisId\fP Axis index
  1224. .br
  1225. \fItitle\fP Axis title
  1226. .RE
  1227. .PP
  1228. .SS "void QwtPlot::setCanvas (QWidget * canvas)"
  1229. .PP
  1230. Set the drawing canvas of the plot widget\&. \fBQwtPlot\fP invokes methods of the canvas as meta methods ( see QMetaObject )\&. In opposite to using conventional C++ techniques like virtual methods they allow to use canvas implementations that are derived from QWidget or QGLWidget\&.
  1231. .PP
  1232. The following meta methods could be implemented:
  1233. .PP
  1234. .IP "\(bu" 2
  1235. \fBreplot()\fP When the canvas doesn't offer a replot method, \fBQwtPlot\fP calls update() instead\&.
  1236. .IP "\(bu" 2
  1237. borderPath() The border path is necessary to clip the content of the canvas When the canvas doesn't have any special border ( f\&.e rounded corners ) it is o\&.k\&. not to implement this method\&.
  1238. .PP
  1239. .PP
  1240. The default canvas is a \fBQwtPlotCanvas\fP
  1241. .PP
  1242. \fBParameters\fP
  1243. .RS 4
  1244. \fIcanvas\fP Canvas Widget
  1245. .RE
  1246. .PP
  1247. \fBSee also\fP
  1248. .RS 4
  1249. \fBcanvas()\fP
  1250. .RE
  1251. .PP
  1252. .SS "void QwtPlot::setCanvasBackground (const QBrush & brush)"
  1253. .PP
  1254. Change the background of the plotting area\&. Sets brush to QPalette::Window of all color groups of the palette of the canvas\&. Using \fBcanvas()\fP->setPalette() is a more powerful way to set these colors\&.
  1255. .PP
  1256. \fBParameters\fP
  1257. .RS 4
  1258. \fIbrush\fP New background brush
  1259. .RE
  1260. .PP
  1261. \fBSee also\fP
  1262. .RS 4
  1263. \fBcanvasBackground()\fP
  1264. .RE
  1265. .PP
  1266. .SS "void QwtPlot::setFooter (const QString & text)"
  1267. Change the text the footer
  1268. .PP
  1269. \fBParameters\fP
  1270. .RS 4
  1271. \fItext\fP New text of the footer
  1272. .RE
  1273. .PP
  1274. .SS "void QwtPlot::setFooter (const \fBQwtText\fP & text)"
  1275. Change the text the footer
  1276. .PP
  1277. \fBParameters\fP
  1278. .RS 4
  1279. \fItext\fP New text of the footer
  1280. .RE
  1281. .PP
  1282. .SS "void QwtPlot::setPlotLayout (\fBQwtPlotLayout\fP * layout)"
  1283. .PP
  1284. Assign a new plot layout\&.
  1285. .PP
  1286. \fBParameters\fP
  1287. .RS 4
  1288. \fIlayout\fP Layout()
  1289. .RE
  1290. .PP
  1291. \fBSee also\fP
  1292. .RS 4
  1293. \fBplotLayout()\fP
  1294. .RE
  1295. .PP
  1296. .SS "void QwtPlot::setTitle (const QString & title)"
  1297. Change the plot's title
  1298. .PP
  1299. \fBParameters\fP
  1300. .RS 4
  1301. \fItitle\fP New title
  1302. .RE
  1303. .PP
  1304. .SS "void QwtPlot::setTitle (const \fBQwtText\fP & title)"
  1305. Change the plot's title
  1306. .PP
  1307. \fBParameters\fP
  1308. .RS 4
  1309. \fItitle\fP New title
  1310. .RE
  1311. .PP
  1312. .SS "QSize QwtPlot::sizeHint () const\fC [virtual]\fP"
  1313. .PP
  1314. \fBReturns\fP
  1315. .RS 4
  1316. Size hint for the plot widget
  1317. .RE
  1318. .PP
  1319. \fBSee also\fP
  1320. .RS 4
  1321. \fBminimumSizeHint()\fP
  1322. .RE
  1323. .PP
  1324. .SS "\fBQwtText\fP QwtPlot::title () const"
  1325. .PP
  1326. \fBReturns\fP
  1327. .RS 4
  1328. Title of the plot
  1329. .RE
  1330. .PP
  1331. .SS "\fBQwtTextLabel\fP * QwtPlot::titleLabel ()"
  1332. .PP
  1333. \fBReturns\fP
  1334. .RS 4
  1335. Title label widget\&.
  1336. .RE
  1337. .PP
  1338. .SS "const \fBQwtTextLabel\fP * QwtPlot::titleLabel () const"
  1339. .PP
  1340. \fBReturns\fP
  1341. .RS 4
  1342. Title label widget\&.
  1343. .RE
  1344. .PP
  1345. .SS "double QwtPlot::transform (int axisId, double value) const"
  1346. .PP
  1347. Transform a value into a coordinate in the plotting region\&.
  1348. .PP
  1349. \fBParameters\fP
  1350. .RS 4
  1351. \fIaxisId\fP Axis index
  1352. .br
  1353. \fIvalue\fP value
  1354. .RE
  1355. .PP
  1356. \fBReturns\fP
  1357. .RS 4
  1358. X or Y coordinate in the plotting region corresponding to the value\&.
  1359. .RE
  1360. .PP
  1361. .SS "void QwtPlot::updateAxes ()"
  1362. .PP
  1363. Rebuild the axes scales\&. In case of autoscaling the boundaries of a scale are calculated from the bounding rectangles of all plot items, having the \fBQwtPlotItem::AutoScale\fP flag enabled ( \fBQwtScaleEngine::autoScale()\fP )\&. Then a scale division is calculated ( QwtScaleEngine::didvideScale() ) and assigned to scale widget\&.
  1364. .PP
  1365. When the scale boundaries have been assigned with \fBsetAxisScale()\fP a scale division is calculated ( QwtScaleEngine::didvideScale() ) for this interval and assigned to the scale widget\&.
  1366. .PP
  1367. When the scale has been set explicitly by \fBsetAxisScaleDiv()\fP the locally stored scale division gets assigned to the scale widget\&.
  1368. .PP
  1369. The scale widget indicates modifications by emitting a \fBQwtScaleWidget::scaleDivChanged()\fP signal\&.
  1370. .PP
  1371. \fBupdateAxes()\fP is usually called by \fBreplot()\fP\&.
  1372. .PP
  1373. \fBSee also\fP
  1374. .RS 4
  1375. \fBsetAxisAutoScale()\fP, \fBsetAxisScale()\fP, \fBsetAxisScaleDiv()\fP, \fBreplot()\fP \fBQwtPlotItem::boundingRect()\fP
  1376. .RE
  1377. .PP
  1378. .SS "void QwtPlot::updateCanvasMargins ()"
  1379. .PP
  1380. Update the canvas margins\&. Plot items might indicate, that they need some extra space at the borders of the canvas by the \fBQwtPlotItem::Margins\fP flag\&.
  1381. .PP
  1382. \fBgetCanvasMarginsHint()\fP, \fBQwtPlotItem::getCanvasMarginHint()\fP
  1383. .SS "void QwtPlot::updateLayout ()\fC [virtual]\fP"
  1384. .PP
  1385. Adjust plot content to its current size\&.
  1386. .PP
  1387. \fBSee also\fP
  1388. .RS 4
  1389. \fBresizeEvent()\fP
  1390. .RE
  1391. .PP
  1392. .SS "void QwtPlot::updateLegend ()"
  1393. Emit \fBlegendDataChanged()\fP for all plot item
  1394. .PP
  1395. \fBSee also\fP
  1396. .RS 4
  1397. \fBQwtPlotItem::legendData()\fP, \fBlegendDataChanged()\fP
  1398. .RE
  1399. .PP
  1400. .SS "void QwtPlot::updateLegend (const \fBQwtPlotItem\fP * plotItem)"
  1401. Emit \fBlegendDataChanged()\fP for a plot item
  1402. .PP
  1403. \fBParameters\fP
  1404. .RS 4
  1405. \fIplotItem\fP Plot item
  1406. .RE
  1407. .PP
  1408. \fBSee also\fP
  1409. .RS 4
  1410. \fBQwtPlotItem::legendData()\fP, \fBlegendDataChanged()\fP
  1411. .RE
  1412. .PP
  1413. .SH "Author"
  1414. .PP
  1415. Generated automatically by Doxygen for Qwt User's Guide from the source code\&.