Commit 07024caa authored by Paul Asmuth's avatar Paul Asmuth
Browse files

update the examples page

parent 37aeb122
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ using namespace std::placeholders;

namespace fviz::elements::plot::axis {

static const double kDefaultTitlePaddingHorizEM = 1.4;
static const double kDefaultTitlePaddingHorizEM = .6;
static const double kDefaultTitlePaddingVertEM = 1;
static const double kDefaultLabelPaddingEM = 0.8;
static const double kDefaultLineWidthPT = 1;
+2 −2
Original line number Diff line number Diff line
(set width 800px)
(set height 600px)
(set width 1000px)
(set height 400px)

(plot
    axes (left bottom)
+47 −47
Original line number Diff line number Diff line
<svg xmlns="http://www.w3.org/2000/svg" width="800.000000" height="600.000000" viewBox="0 0 800 600">
  <rect width="800.000000" height="600.000000" fill="#ffffff"/>
  <path fill="#999999" d="M230.832 555.6 L218.559 549.16 L120.097 541.614 L124.554 534.067 L145.299 526.521 L98.026 518.974 L94.584 511.428 L124.462 503.881 L152.534 496.335 L95.6207 488.788 L130.13 481.242 L117.043 473.695 L192.081 466.149 L168.164 458.602 L136.439 451.056 L173.137 443.509 L130.387 435.963 L112.175 428.416 L97.1919 420.87 L96.596 413.323 L96.6708 405.777 L165.177 398.23 L426.57 390.684 L625.68 383.137 L616.299 375.591 L599.204 368.044 L366.753 360.498 L304.683 352.951 L187.851 345.405 L127.262 337.858 L105.918 330.312 L111.525 322.765 L104.703 315.219 L111.484 307.672 L178.805 300.126 L184.696 292.579 L187.084 285.033 L213.341 277.486 L201.271 269.94 L180.561 262.393 L190.376 254.847 L223.906 247.3 L275.78 239.754 L269.905 232.207 L304.016 224.661 L250.214 217.114 L226.211 209.568 L170.644 202.021 L199.54 194.475 L295.268 186.928 L313.65 179.382 L267.572 171.835 L258.025 164.289 L271.201 156.742 L295.642 149.196 L198.646 141.649 L167.154 134.103 L253.832 126.556 L197.435 119.01 L134.501 111.463 L141.073 103.917 L206.295 96.3701 L157.83 88.8236 L152.658 81.2771 L142.985 73.7306 L153.23 66.1841 L143.547 58.6376 L179.786 51.0911 L148.042 43.5446 L167.861 35.9981 L187.723 28.4516 L170.134 20.9051 L134.892 14.6667 L83.4938 14.6667 L83.4938 20.9051 L83.4938 28.4516 L83.4938 35.9981 L83.4938 43.5446 L83.4938 51.0911 L83.4938 58.6376 L83.4938 66.1841 L83.4938 73.7306 L83.4938 81.2771 L83.4938 88.8236 L83.4938 96.3701 L83.4938 103.917 L83.4938 111.463 L83.4938 119.01 L83.4938 126.556 L83.4938 134.103 L83.4938 141.649 L83.4938 149.196 L83.4938 156.742 L83.4938 164.289 L83.4938 171.835 L83.4938 179.382 L83.4938 186.928 L83.4938 194.475 L83.4938 202.021 L83.4938 209.568 L83.4938 217.114 L83.4938 224.661 L83.4938 232.207 L83.4938 239.754 L83.4938 247.3 L83.4938 254.847 L83.4938 262.393 L83.4938 269.94 L83.4938 277.486 L83.4938 285.033 L83.4938 292.579 L83.4938 300.126 L83.4938 307.672 L83.4938 315.219 L83.4938 322.765 L83.4938 330.312 L83.4938 337.858 L83.4938 345.405 L83.4938 352.951 L83.4938 360.498 L83.4938 368.044 L83.4938 375.591 L83.4938 383.137 L83.4938 390.684 L83.4938 398.23 L83.4938 405.777 L83.4938 413.323 L83.4938 420.87 L83.4938 428.416 L83.4938 435.963 L83.4938 443.509 L83.4938 451.056 L83.4938 458.602 L83.4938 466.149 L83.4938 473.695 L83.4938 481.242 L83.4938 488.788 L83.4938 496.335 L83.4938 503.881 L83.4938 511.428 L83.4938 518.974 L83.4938 526.521 L83.4938 534.067 L83.4938 541.614 L83.4938 549.16 L83.4938 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 555.6 L785.333 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 550.267 L83.4938 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M153.678 550.267 L153.678 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M223.862 550.267 L223.862 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M294.046 550.267 L294.046 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M364.23 550.267 L364.23 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M434.414 550.267 L434.414 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M504.598 550.267 L504.598 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M574.781 550.267 L574.781 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M644.965 550.267 L644.965 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M715.149 550.267 L715.149 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M785.333 550.267 L785.333 555.6 "/>
  <text x="73.298438" y="581.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">0.0</text>
  <text x="139.404272" y="581.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">15.0</text>
  <text x="209.588231" y="581.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">30.0</text>
  <text x="279.772196" y="581.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">45.0</text>
  <text x="349.956150" y="581.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">60.0</text>
  <text x="420.140104" y="581.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">75.0</text>
  <text x="490.324079" y="581.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">90.0</text>
  <text x="556.429887" y="581.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">105.0</text>
  <text x="626.613863" y="581.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">120.0</text>
  <text x="696.797838" y="581.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">135.0</text>
  <text x="766.981771" y="581.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">150.0</text>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 14.6667 L83.4938 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 555.6 L88.8271 555.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 501.507 L88.8271 501.507 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 447.413 L88.8271 447.413 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 393.32 L88.8271 393.32 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 339.227 L88.8271 339.227 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 285.133 L88.8271 285.133 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 231.04 L88.8271 231.04 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 176.947 L88.8271 176.947 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 122.853 L88.8271 122.853 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 68.76 L88.8271 68.76 "/>
<svg xmlns="http://www.w3.org/2000/svg" width="1000.000000" height="400.000000" viewBox="0 0 1000 400">
  <rect width="1000.000000" height="400.000000" fill="#ffffff"/>
  <path fill="#999999" d="M272.819 355.6 L257.048 351.541 L130.528 346.785 L136.255 342.029 L162.912 337.272 L102.167 332.516 L97.7443 327.76 L136.136 323.003 L172.208 318.247 L99.0765 313.491 L143.42 308.734 L126.604 303.978 L223.024 299.222 L192.292 294.465 L151.526 289.709 L198.682 284.953 L143.75 280.196 L120.349 275.44 L101.095 270.684 L100.33 265.927 L100.426 261.171 L188.453 256.415 L524.335 251.658 L780.184 246.902 L768.131 242.146 L746.164 237.389 L447.472 232.633 L367.714 227.877 L217.589 223.121 L139.735 218.364 L112.308 213.608 L119.512 208.852 L110.747 204.095 L119.46 199.339 L205.966 194.583 L213.535 189.826 L216.603 185.07 L250.343 180.314 L234.833 175.557 L208.222 170.801 L220.834 166.045 L263.919 161.288 L330.576 156.532 L323.026 151.776 L366.857 147.019 L297.723 142.263 L266.88 137.507 L195.479 132.75 L232.609 127.994 L355.617 123.238 L379.237 118.481 L320.028 113.725 L307.76 108.969 L324.691 104.212 L356.097 99.4561 L231.461 94.6998 L190.994 89.9434 L302.373 85.1871 L229.904 80.4308 L149.036 75.6745 L157.481 70.9181 L241.289 66.1618 L179.013 61.4055 L172.367 56.6492 L159.939 51.8928 L173.102 47.1365 L160.66 42.3802 L207.226 37.6239 L166.436 32.8675 L191.902 28.1112 L217.425 23.3549 L194.823 18.5986 L149.539 14.6667 L83.4938 14.6667 L83.4938 18.5986 L83.4938 23.3549 L83.4938 28.1112 L83.4938 32.8675 L83.4938 37.6239 L83.4938 42.3802 L83.4938 47.1365 L83.4938 51.8928 L83.4938 56.6492 L83.4938 61.4055 L83.4938 66.1618 L83.4938 70.9181 L83.4938 75.6745 L83.4938 80.4308 L83.4938 85.1871 L83.4938 89.9434 L83.4938 94.6998 L83.4938 99.4561 L83.4938 104.212 L83.4938 108.969 L83.4938 113.725 L83.4938 118.481 L83.4938 123.238 L83.4938 127.994 L83.4938 132.75 L83.4938 137.507 L83.4938 142.263 L83.4938 147.019 L83.4938 151.776 L83.4938 156.532 L83.4938 161.288 L83.4938 166.045 L83.4938 170.801 L83.4938 175.557 L83.4938 180.314 L83.4938 185.07 L83.4938 189.826 L83.4938 194.583 L83.4938 199.339 L83.4938 204.095 L83.4938 208.852 L83.4938 213.608 L83.4938 218.364 L83.4938 223.121 L83.4938 227.877 L83.4938 232.633 L83.4938 237.389 L83.4938 242.146 L83.4938 246.902 L83.4938 251.658 L83.4938 256.415 L83.4938 261.171 L83.4938 265.927 L83.4938 270.684 L83.4938 275.44 L83.4938 280.196 L83.4938 284.953 L83.4938 289.709 L83.4938 294.465 L83.4938 299.222 L83.4938 303.978 L83.4938 308.734 L83.4938 313.491 L83.4938 318.247 L83.4938 323.003 L83.4938 327.76 L83.4938 332.516 L83.4938 337.272 L83.4938 342.029 L83.4938 346.785 L83.4938 351.541 L83.4938 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 355.6 L985.333 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 350.267 L83.4938 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M173.678 350.267 L173.678 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M263.862 350.267 L263.862 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M354.046 350.267 L354.046 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M444.23 350.267 L444.23 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M534.414 350.267 L534.414 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M624.598 350.267 L624.598 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M714.781 350.267 L714.781 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M804.965 350.267 L804.965 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M895.149 350.267 L895.149 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M985.333 350.267 L985.333 355.6 "/>
  <text x="73.298438" y="381.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">0.0</text>
  <text x="159.404272" y="381.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">15.0</text>
  <text x="249.588232" y="381.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">30.0</text>
  <text x="339.772198" y="381.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">45.0</text>
  <text x="429.956151" y="381.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">60.0</text>
  <text x="520.140104" y="381.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">75.0</text>
  <text x="610.324084" y="381.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">90.0</text>
  <text x="696.429885" y="381.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">105.0</text>
  <text x="786.613865" y="381.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">120.0</text>
  <text x="876.797845" y="381.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">135.0</text>
  <text x="966.981771" y="381.333333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">150.0</text>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 14.6667 L83.4938 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 355.6 L88.8271 355.6 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 321.507 L88.8271 321.507 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 287.413 L88.8271 287.413 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 253.32 L88.8271 253.32 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 219.227 L88.8271 219.227 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 185.133 L88.8271 185.133 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 151.04 L88.8271 151.04 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 116.947 L88.8271 116.947 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 82.8533 L88.8271 82.8533 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 48.76 L88.8271 48.76 "/>
  <path stroke-width="1.333333" stroke="#000000" fill="none" d="M83.4938 14.6667 L88.8271 14.6667 "/>
  <text x="14.666667" y="560.600000" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">05:15:44</text>
  <text x="14.666667" y="506.506666" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">05:51:34</text>
  <text x="14.666667" y="452.413332" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">06:27:24</text>
  <text x="14.666667" y="398.319994" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">07:03:15</text>
  <text x="14.666667" y="344.226663" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">07:39:05</text>
  <text x="14.666667" y="290.133333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">08:14:56</text>
  <text x="14.666667" y="236.039987" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">08:50:46</text>
  <text x="14.666667" y="181.946673" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">09:26:36</text>
  <text x="14.666667" y="127.853327" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">10:02:27</text>
  <text x="14.666667" y="73.759981" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">10:38:17</text>
  <text x="14.666667" y="360.600000" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">05:15:44</text>
  <text x="14.666667" y="326.506666" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">05:51:34</text>
  <text x="14.666667" y="292.413332" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">06:27:24</text>
  <text x="14.666667" y="258.319996" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">07:03:15</text>
  <text x="14.666667" y="224.226665" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">07:39:05</text>
  <text x="14.666667" y="190.133333" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">08:14:56</text>
  <text x="14.666667" y="156.039992" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">08:50:46</text>
  <text x="14.666667" y="121.946671" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">09:26:36</text>
  <text x="14.666667" y="87.853329" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">10:02:27</text>
  <text x="14.666667" y="53.759988" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">10:38:17</text>
  <text x="15.760417" y="19.666667" fill="#000000" font-size="14.666667" font-family="Arial,Helvetica,'Helvetica Neue',sans-serif" font-weight="500.000000">11:14:08</text>
</svg>
 No newline at end of file
+4 −3
Original line number Diff line number Diff line
(set height 240px)
(set height 200px)
(set width 900px)

(plot
    scale-x-padding 0.6
    limit-y (-15 30)
    axes (bottom left)
    axis-x-label-placement (linear-alignat 1 1)
    axis-x-label-format (custom "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec")
    limit-y (-15 30)
    axis-y-label-placement (linear-interval 5 -10 30)
    axes (bottom left)
    axis-y-title "Temperature (°C)"
    lines (
        data-x (csv "tests/testdata/city_temperatures.csv" month)
        data-y (csv "tests/testdata/city_temperatures.csv" temp_beijing)
+92 −91

File changed.

Preview size limit exceeded, changes collapsed.

Loading