te')); return $arr; } /* 遍历用户所有主题 * @param $uid 用户ID * @param int $page 页数 * @param int $pagesize 每页记录条数 * @param bool $desc 排序方式 TRUE降序 FALSE升序 * @param string $key 返回的数组用那一列的值作为 key * @param array $col 查询哪些列 */ function thread_tid_find_by_uid($uid, $page = 1, $pagesize = 1000, $desc = TRUE, $key = 'tid', $col = array()) { if (empty($uid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('uid' => $uid), array('tid' => $orderby), $page, $pagesize, $key, $col); return $arr; } // 遍历栏目下tid 支持数组 $fid = array(1,2,3) function thread_tid_find_by_fid($fid, $page = 1, $pagesize = 1000, $desc = TRUE) { if (empty($fid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('fid' => $fid), array('tid' => $orderby), $page, $pagesize, 'tid', array('tid', 'verify_date')); return $arr; } function thread_tid_delete($tid) { if (empty($tid)) return FALSE; $r = thread_tid__delete(array('tid' => $tid)); return $r; } function thread_tid_count() { $n = thread_tid__count(); return $n; } // 统计用户主题数 大数量下严谨使用非主键统计 function thread_uid_count($uid) { $n = thread_tid__count(array('uid' => $uid)); return $n; } // 统计栏目主题数 大数量下严谨使用非主键统计 function thread_fid_count($fid) { $n = thread_tid__count(array('fid' => $fid)); return $n; } ?>tikz - Wheelchart error about WCvarB being an undefined control sequence - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

tikz - Wheelchart error about WCvarB being an undefined control sequence - Stack Overflow

programmeradmin3浏览0评论

I’d like to know why I get and how to correct the following error

(./Feb-15-wheel-cal-fro-teach (minex1).aux) ./Feb-15-wheel-cal-fro-teach (minex1).tex:37: Undefined control sequence. \pgfkeyscurrentkey ->\WCvarB

l.37 }

received when compiling the code below. [When I go to scroll mode, the code compiles and generates an image that looks like I want.]

when running this code (based on modifying the code here by @matexmatics.

\documentclass[border=6pt]{standalone}
\usepackage{wheelchart}
\begin{document}
\begin{tikzpicture}
\sffamily
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfkeys{
  /wheelchart,
  arc data dir=1,
  arc data expand=f,
  arc data pos=0.5,
  arc data sep=0,
  data=,
  domain=450:90,
  plot={{#1}:{#2+0.00416*(450-#1)}},
  value=1,
  wheel data pos=0.5,
  wheel data style={
    align=center,
    rotate=\WCmidangle+(\WCmidangle<90?0:(\WCmidangle<270?180:0))
  }
}

\wheelchart[
  arc data=\WCvarA,
  radius={6}{7.5},
  slices style{25,26}={purple,draw=lightgray},
  slices style{27,28}={pink,draw=lightgray},
  slices style{29,30}={magenta,draw=lightgray},
  slices style{57}={darkgray}
]{%
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%
}

\end{tikzpicture}
\end{document}

I interpret the error to mean that the package wheelchart expects a WCvarB. Although WCvarB was used in one of the wheelcharts in the code I’m using, it was not in the piece I am modifying. The wheelchart manual refers to WC vars A, B, and C automatically initialized/instantiated (?) and assigned meanings, but I don’t see how WCvarB is expected in this wheelchart.

I tried putting some text in between the commas defining my slices (to see how it reacted to my including something that would be read as the expected WCvarB) but then I couldn’t compile under scroll mode (over 100 errors, it said).

I checked for transcription errors–and added and removed commas where I thought there might be a problem–but couldn’t find any, however I have modified the sample code enough that I wouldn’t know where a comma might be missing or something.

I wasn’t sure exactly what was needed with the pgfkeys call, and when I tried playing with it, either I couldn’t detect a change or I didn’t have compilable code. I’m sure there is unneeded stuff in it since I stripped out the text and labels on this wheelchart call and could remove the other calls in making the minimal.

发布评论

评论列表(0)

  1. 暂无评论