Pyqtgraph how to set the string type horizontal axis

Source: Internet
Author: User

Want to say their own "bumpy" experience, but also hope that there is a need to solve the needs of the basin friends do not go a little detour ...

Pyqtgraph Chinese information is very few, with Chinese Baidu had no fruit, with Bing search pyqtgraph time axis and other find some crooked country basin friends and I have the same problem, but he finally did not solve, and then I found that Pyqtgraph has an official example, You can open the cmd input python-m pyqtgraph.examples, where


This is similar to the axis I want to set the time type for, and it works like this:



Then migrated to my project, of course, direct migration and the coordinates in the above figure is the same, carefully studied the Axisitem this class found that the tickstring has another definition, so Baidu found this reference http://stackoverflow.com/questions/ 31775468/show-string-values-on-x-axis-in-pyqtgraph, I basically solved my problem here, haha >_<


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.