我希望在plot
linespoints
Gnuplot
set terminal png
set out "plot_sample.png"
plot [t=-1000:1000] t w linespoints pt 64 lt 10 ps 1.5
的文件,但使用所有数据样本的行和使用较少数据样本的点。例如,以下文件绘制数据,但该行根本不可见。
class ProfileNewAddressViewController: UIViewController, UIPickerViewDataSource, UIPickerViewDelegate {
// MARK: Properties
@IBOutlet weak var streetTextField: UITextField!
@IBOutlet weak var streetComplementTextField: UITextField!
@IBOutlet weak var zipCodeTextField: UITextField!
@IBOutlet weak var stateTextField: UITextField!
@IBOutlet weak var countryTextField: UITextField!
@IBAction func saveNewAddressPressed(sender: UIButton) {
}
var countries:[String] = []
let countriesPicker = UIPickerView()
func populateCountries() {
countries = RestApiManager.sharedInstance.getCountries()!
countriesPicker.reloadAllComponents()
}
override func viewDidLoad() {
super.viewDidLoad()
populateCountries()
countriesPicker.delegate = self
countriesPicker.dataSource = self
countryTextField.inputView = countriesPicker
}
func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int {
return 1
}
func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return countries.count
}
func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int)
{
return countryTextField.text = countries[row]
}
func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
return countries[row]
}
如果我想为点定义自定义采样间隔但是使用该线的所有数据样本,该怎么做?我可以在同一个图中做两个单独的图,但是键会分别显示它们。
答案 0 :(得分:7)
使用pointinterval
减少绘制点的数量,但保留绘制线的所有点:
set samples 100
plot x**2 w linespoints pointinterval 10
答案 1 :(得分:2)
every
减少从文件中获取的样本!notitle
!类似的东西:
plot [t=-1000:1000] 'data.dat' w l lt 10 lc 10 t 'something', '' every 10 w p pt 64 ps 1.5 lc 10 notitle
备注强>
每次使用every
:剧情'alma.dat'答案:B:C:D:E:F
,其中
您可以使用上述所有功能,但如果您不需要,请将其留空,例如。 ...每2或每2 :: 1或每2 :: 1:0等...