Title: Fotherplot
Author: Tom Fotherby
Published: <strong>2009 年 1 月 18 日</strong>
Last modified: 2012 年 3 月 4 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/fotherplot.svg)

# Fotherplot

 由 [Tom Fotherby](https://profiles.wordpress.org/tfotherby/) 開發

[下載](https://downloads.wordpress.org/plugin/fotherplot.0.0.9.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/fotherplot/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/fotherplot/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/fotherplot/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/fotherplot/#developers)

 [技術支援](https://wordpress.org/support/plugin/fotherplot/)

## 外掛說明

After [working out how to plot time-based data using Google charts API](http://www.tomfotherby.com/blog/index.php/2009/01/how-to-plot-dates-in-google-charts-api/),
I created a WordPress plugin to plot values stored in a custom field against the
published-on date of WordPress blog posts that use the field.

### Usage Example

I use this plugin to keep a track of my weight. I have a private WordPress journal
with a custom field called “Weight (kgs)” and each week when I make my journal entry
I fill in my weight in this custom field. I have page called “My Weight” which is
empty but uses the **Fotherplot** Template.

The plugin outputs [a image](http://chart.apis.google.com/chart?&cht=lxy&chs=450x300&chma=10,10,10,10&chds=0,364,98.9,116.1&chg=0,5&chxt=y,x&chxl=0:|98.9|102.34|105.78|109.22|112.66|116.1|1:|20/Jan/08|11/Feb/08|17/Jul/08|18/Oct/08|10/Jan/09&chm=D,FF0000,0,-1,1|o,000000,0,-1,4|N,000000,0,-1,9&chd=t:0,8,15,22,50,79,180,224,263,273,290,350,357,364|103.4,102.9,102.3,100.9,99.3,98.9,103.4,110.5,112.9,109.7,110,116.1,113.4,110.67)
and a list of the relevant data, example:

 * January 17, 2009: 110.67kgs
 * January 10, 2009: 113.4kgs
 * January 3, 2009: 116.1kgs
 * November 5, 2008: 110kgs
 * October 18, 2008: 109.7kgs
 * October 8, 2008: 112.9kgs
 * August 30, 2008: 110.5kgs
 * July 17, 2008: 103.4kgs
 * April 8, 2008: 98.9kgs
 * March 10, 2008: 99.3kgs
 * February 11, 2008: 100.9kgs
 * February 4, 2008: 102.3kgs
 * January 28, 2008: 102.9kgs
 * January 20, 2008: 103.4kgs

## 螢幕擷圖

 * [[
 * This screenshot is an Example of the chart the plugin produces.
 * [[
 * This screenshot is an Example of the plugins admin page.

## 安裝方式

 1. Download the **fotherplot** plugin and you will get a directory called “fotherplot”
    when you unzip the downloaded file. Upload the “fotherplot” directory to your WordPress
    plugins directory (e.g. `/wp-content/plugins/`)
 2. Activate the plugin through the ‘Plugins’ menu in the WordPress dashboard.
 3. Do you already have some data that you want to chart contained in a custom field?
    If so, go to the Fotherplot settings page and specify the custom field name in 
    the dropdown. If not, decide what the name of the custom field that you want to
    plot is going to be and create a couple of posts (with different publish dates)
    first.
 4. To display the graph on your blog see https://wordpress.org/extend/plugins/fotherplot/
    faq/

## 常見問題集

  How do I display the fotherplot chart on my blog?

By default the fotherplot chart is only non-publically displayed in the settings
page in the WordPress dashboard. You have three options to display the fotherplot
chart on the public side of your blog:

 1. To display the chart on any post or page, simple embed the text “[fotherplot]” 
    into the content. The tag will be replaced with the chart image.
 2. If you want to display the chart on a page:
 3.  a. Copy the `page_fotherplot.php` page template from the plugin directory to the 
        folder of the theme you’re currently using (`/wp-content/themes/<currentThemeName
        >/`).
     b. From the WordPress dashboard, create a new page.
     c. From the “Template” dropdown in the sidebar, select “Fotherplot”.
     d. Use preview to check it works (remember you need to have a couple of values input
        before you’ll see a chart).
 4. An alternative method to display the chart somewhere specific (e.g. in a post):
 5.  a. Install the [phpexec.php](https://wordpress.org/extend/plugins/exec-php/) plugin
        so you can run PHP code from pages and posts. Activate this plugin from the dashboard.
     b. To plot the chart, in one of your pages or posts, put the following: `<phpcode
        ><?php echo plotDataAgainstTime(); ?></phpcode>`. You can just display the chart
        or just the data list (or both). See the parameter options below.

  What are the parameters that can be passed to the “plotDataAgainstTime()” function?

 1. Optional Parameter 1: Name of custom field. This is not necessary because by default
    the custom field specified in the settings page is used but you can use this if
    you want to override the default (i.e. Only really useful if you want to chart 
    more than one custom field).
 2. Optional Parameter 3: Whether to show chart image. 1=yes, 0=no. Defaults to yes.
 3. Optional Parameter 4: Whether to show list of custom values. 1=yes, 0=no, Defaults
    to yes.
 4.  a. Examples:
     b. You can also use the same parameters in the shortcode: `[fotherplot customfieldname
        ="mycustomfield" showgraph=1 showlist=1]`.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Fotherplot〉的開發相關工作。

參與者

 *   [ Tom Fotherby ](https://profiles.wordpress.org/tfotherby/)

[將〈Fotherplot〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/fotherplot)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/fotherplot/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/fotherplot/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/fotherplot/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/fotherplot/)。

## 變更記錄

#### 0.0.9

 * Modified code to use the shortcode API in order to allow parameters. Now we can
   use `[fotherplot showlist=1]` to show the list of posts that contain the data
   we’re plotting.

#### 0.0.8

 * Fixed bug where the plugin settings page wasn’t showing the chart. I was missing
   a “echo” statement.

#### 0.0.7

 * Fixed bug encountered when plugin is first installed and only 2 data items exist
   in posts published on the same day. Now gives an error message (instead of going
   into a infinite loop, i.e. crashing).

#### 0.0.6

 * No code change – just updated to new Changelog format and fixed broken screenshot
   images.

#### 0.0.5

 * Added “[fotherplot]” WordPress shortcode.
 * Fixed date bug.

#### 0.0.4

 * Added a fotherplot settings page in the WordPress dashboard where you can specify
   the custom field you want to chart (Yay! no need to touch PHP code anymore).
 * Added some error messages: e.g. displays error if non-numeric custom field values
   are used, or if not enough data is input or if no custom fields are available.

#### 0.0.3

 * Added a fotherplot page template so it’s possible to use the plugin without installing
   the `phpexec’ plugin. No functionality change in this release.

#### 0.0.2

 * First WordPress plugin version. Two features: 1) Draw chart of custom field value
   over time. 2) Display list of values in time order.

#### 0.0.1

 * Inital draft version (Not in proper WordPress plugin format)

## 中繼資料

 *  版本 **0.0.9**
 *  最後更新 **14 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 2.5 或更新版本 **
 *  已測試相容的 WordPress 版本 **3.3.2**
 *  語言
 * [English (US)](https://wordpress.org/plugins/fotherplot/)
 * 標籤:
 * [chart](https://tw.wordpress.org/plugins/tags/chart/)[custom fields](https://tw.wordpress.org/plugins/tags/custom-fields/)
   [google chart API](https://tw.wordpress.org/plugins/tags/google-chart-api/)[graph](https://tw.wordpress.org/plugins/tags/graph/)
   [plot](https://tw.wordpress.org/plugins/tags/plot/)
 *  [進階檢視](https://tw.wordpress.org/plugins/fotherplot/advanced/)

## 評分

 5 星，滿分為 5 星

 *  [  1 個 5 星使用者評論     ](https://wordpress.org/support/plugin/fotherplot/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/fotherplot/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/fotherplot/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/fotherplot/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/fotherplot/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/fotherplot/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/fotherplot/reviews/)

## 參與者

 *   [ Tom Fotherby ](https://profiles.wordpress.org/tfotherby/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/fotherplot/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](http://www.amazon.co.uk/gp/registry/wishlist/5EU9QS88QKOI)